Forum Post: RE: What have you done with the GUID function?

  • Thread starter Thread starter Fabian Frank
  • Start date Start date
Status
Not open for further replies.
F

Fabian Frank

Guest
It's the latter. The call to GUID was just a minor part of a larger script I used for performance comparison between 11.1 and 11.3. But it was not about GUID. Because the results looked very strange to mee, I analyzed the root cause and discovered the huge performance difference in UUID creation. Because you mentioned it was too fast in 11.1 because of the bug, I compared it to some other languages: C# 0.5 seconds var sw = new Stopwatch(); sw.Start(); for (int i = 0; i 1000000; i++) { Guid.NewGuid(); } sw.Stop(); Console.WriteLine(sw.Elapsed); Java 0.9 seconds long start = System.currentTimeMillis(); for (int i = 0; i 1000000; i++) { UUID.randomUUID(); } System.out.println(System.currentTimeMillis() - start); Go 1 second package main import ( "fmt" "time" "github.com/nu7hatch/gouuid" ) func main() { start := time.Now() for i := 0; i 1000000; i++ { uuid.NewV4() } fmt.Println(time.Since(start)) } Ruby 8.7 seconds require 'securerandom' start = Time.now for i in 1..1000000 SecureRandom.uuid end puts Time.now - start Python 12.9 seconds import uuid, time start = time.time() for x in range(1, 1000000): uuid.uuid4() print(time.time() - start) This result shows that 300 ms for OE 11.1 is indeed a pretty unrealistic result. But 50 seconds seems to be too much. OpenEdge should at least be faster than the interpreted languages python and ruby.

Continue reading...
 
Status
Not open for further replies.
Back
Top