[Mono-dev] Big performance gaps between .NET, Mono (Suse/Debian) ?

Alan McGovern alan.mcgovern at gmail.com
Tue Oct 6 06:46:16 EDT 2009

Calling 'ToString' is just a GC benchmark. Yes, the current mono GC is
slower than the .NET GC in this scenario. Your other tests also do a fair
bit of allocating, so it's quite possible the entire performance loss you're
seeing is just from the GC kicking in. If you want to test how fast you can
add elements to a Dictionary, pre-allocate all the objects first and then
time just the addition.


On Tue, Oct 6, 2009 at 10:15 AM, Lionel Cuir <lionel_email at aulofee.com>wrote:

>  Hello,
> Can anybody help me to understand why, on simple performance tests, I see
> so different results between .NET and Mono on various Linux platforms? Are
> my tests incorrect? Did I have no luck and simply fall on some
> methods/functionality better implemented by MS? And why is there such a
> difference between Suse and Debian for the IPAddress dictionary?
> Any help appreciated (please, no trolling, no political debate - just ideas
> about how to improve things or ideas to point out methodology errors I would
> have made in my tests)
> Regards,
> Lionel
> A few hints on how I did my tests:
> - the OS are: a bare XP SP3, a bare OpenSuse (kernel 2.6.27), a Debian with
> a lightened kernel (2.6.30) - "bare" = the OS is up-to-date but no other
> software installed
> - all OS were running as vmware guest (in vm workstation 6.5) with two
> "cpus" (dual-core T7200) and 512Mo of RAM
> - Mono version was on Suse, and 2.5 (compiled from SVN r140059) on
> Debian. .NET version is 3.5
> - On Suse and Debian, I both run the tests with the exe compiled with csc
> (.net) and with the exe compiled with gmcs - the results were the same.
> You'll find attached the sample code I used - I test basically adictionary of int,
> a dictionary of IPAddress and the IPAddress.ToString method. The duration
> of the test (in millisec are:
> int32 Dictionary test
> 4812 DotNet
> 9493 Mono on light Debian
> 9815 Mono on Suse
> IPAddress Dictionary test
> 13500 DotNet
> 29533 Mono on light Debian
> 41732 Mono on Suse
> IPAddress.ToString test
> 2453 DotNet
> 16665 Mono on light Debian
> 17747 Mono on Suse
> _______________________________________________
> 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/20091006/6da82b71/attachment.html 

More information about the Mono-devel-list mailing list