[Mono-list] Poor Mono performance

edward.harvey.mono edward.harvey.mono at clevertrove.com
Tue Mar 12 14:05:47 UTC 2013


> From: mono-list-bounces at lists.ximian.com [mailto:mono-list-
> bounces at lists.ximian.com] On Behalf Of imreolajos
> 
> SpeedTest.cs
> <http://mono.1490590.n4.nabble.com/file/n4658877/SpeedTest.cs>

Ok, you've provided some source code, you said it is important to you, and it represents your real life work load.  You've said you had some performance problems with it and would like to know why and what to do about it ...  Other people here have commented that it seems we're avoiding the problem.

So, I'll bite:

I downloaded the file you linked above, and compiled it, .Net 4 Windows 7 x86_64 dual core intel i5.  It ran in 3.3 sec.  I then ran on the exact same machine in windows mono 2.10.9 and it ran in 3.66 sec.  To eliminate sampling error, I ran repeatedly, and alternatingly.  Windows 3.4, Mono 3.41, Win 3.3, Mono 3.41, Win 3.3, Mono 3.43

While the mono performance is a little lower, it's not dramatic.

I then set var totals = new List<int>() { 10, 10, 100, 100, 1000 };
to make the job run longer, and ran again.  Win 32.7, Mono 32.8, Win 32.4, Mono 32.9

Even less dramatic.

I set the totals list back to the original presets.  Deployed the .exe to a slightly slower windows 7 x86_64 virtual machine with 2 cpu's and 1 g ram, and also deployed (and recompiled) to a fedora 17 x86_64 machine, mono 2.10.8 installed via yum.  The win & lin machines have identical system specs, running on the same host hardware.  win 4.9, lin 3.2, win 4.9, lin 3.2, win 4.9, lin 3.2

The most dramatic result we're seeing in any of these tests, is that mono for linux is significantly faster than .Net for this particular task, while mono for windows is slightly slower than .Net.  Again, specifically for this test case in this configuration.  I would not be comfortable generalizing anything from this.  I bet you'll see different results with different patch levels of Windows or linux, different versions of .Net, different versions of mono, different on 32bit vs 64bit hardware, etc.



More information about the Mono-list mailing list