[Mono-dev] GUID generation
joncham at gmail.com
Fri Jul 27 13:18:04 EDT 2007
A quick test on my Xeon 3.6GHz reveals the following for me for generating a
.Net: 300 ms
mono: 2300 ms
mono (modified): 1875 ms
So, not quite sure why you see 8 seconds on your server. For the modified
version, I simply made the byte array inside of NewGuid static (since we are
already locking for the RNG) for some performance improvement. Can someone
comment if that change is acceptable?
On 7/27/07, pablosantosluac <pablosantosluac at terra.es> wrote:
> I need to generate a large number of GUIDs. I tried with my laptop and a
> .net console application and it can generate about 1million GUIDs in about
> Then I tried the same with mono and it needed 3.4 seconds.
> My surprise was trying on our Server (Intel(R) Xeon(TM) CPU 3.00GHz) where
> got the following results:
> 8 seconds to generate a million of GUIDs.
> Surprinsingly my old Sun Blade 1000 took almost the same time (Solaris 10
> SPARC): 9 seconds.
> I guess there is a reason why .NET implements faster GUID generation but,
> there any other globally unique number generator for Mono/Linux which I
> use? Also, any idea why the Xeon (which is much, much faster than both the
> laptop and the Solaris box) is so slooow generating GUIDs?
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list