[Mono-dev] Mono runtime performance

Paolo Molaro lupus at ximian.com
Wed Sep 14 14:10:13 EDT 2005

On 09/14/05 Graeme Geldenhuys wrote:
> Anyway, the result was shocking!  The mono runtime was about 67% slower than 
> the microsoft runtime.  Anybody know why?  I was testing this under Windows 

It looks like you're easily shocked. After having checked the results,
I'm not shocked, though I'm amused that mono is more than 3 times faster
than the MS runtime on one of the sub-benchmarks, and significantly
faster in at least another one, considering they have hundreds of people working 
on the CLR and according to their blogs they have more managers in the JIT 
team than we have programmers and we still have a JIT that works on 7+ 
different architectures and is comparable in performance.

That said, a few considerations:
*) if you care about performance of the running code you'd better
enable optimizations in the mono JIT, so execute with:
	mono -O=all program.exe
or, usually better,:
	mono -O=all,-ssapre program.exe
With this option your benchmark runs 10-15% faster than without.
*) the primary mono platform is Linux, so you should run mono on Linux
(on the same hw, of course) before comparing
*) yes, we are slower in some cases (and we are faster in others,
sometimes by several times, in benchmarks not included in your test):
we have plans for more jit and runtime speedups and they are
*) a 50% difference in microbenchmarks is usually a 10% difference in
real life applications, which is not noise, but which is also nothing to
be shocked about.

> I didn't write the Benchmark.cs application, I got it off the net.  I will 
> include the code in the next email if anybody wanted to test it themselves.

Next time post it directly, since benchmark numbers without benchmark
code are completely useless. I got my numbers from a benchmark that
could be the one you used (downloaded from:


lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better

More information about the Mono-devel-list mailing list