[Mono-dev] GUID generation
Jonathan Chambers
joncham at gmail.com
Fri Jul 27 13:18:04 EDT 2007
Hello,
A quick test on my Xeon 3.6GHz reveals the following for me for generating a
million GUIDs:
.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?
Thanks,
Jonathan
On 7/27/07, pablosantosluac <pablosantosluac at terra.es> wrote:
>
> Hi,
>
> 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
> 480ms.
>
> 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
> I
> 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,
> is
> there any other globally unique number generator for Mono/Linux which I
> can
> 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?
>
> Thanks,
>
> pablo
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070727/e75f2a8f/attachment.html
More information about the Mono-devel-list
mailing list