[Mono-list] Mono C# versus Java 6 -server performance

Robert Hulme hulme at ebi.ac.uk
Thu Nov 29 09:55:23 EST 2007


> Out of 17 programs, Java was 9 x 1.xx times better, 2 x 2.xx times
> better and 2 times significantly better. 
Here are the results:
regex-dna, Java 7.9x faster
pidigits, Java 6.1x faster
sum-file, Java 2.5x faster
mandlebrot, Java 2.2x faster
spectral-norm, Java 1.9x faster
startup, C# Mono 1.9x faster
fannkuch, Java 1.6x faster
n-body, Java 1.8x faster
binary-trees, Java 1.3x faster
k-nucleotide, Java 1.3x faster
thread-ring, Java 1.2x faster
fasta, Java 1.2x faster
recursive, Java 1.1x faster
nsieve-bits, Java 1.1x faster

nsieve, Equal performance

partial-sums, C# Mono 1.7x faster
reverse-complement, C# Mono 1.2x faster

As always, there are lies, damned lies, and benchmarks. Perhaps the kind 
of programs we write aren't comparable with the spectral-norm benchmark 
(or which ever one). However to get a feel of the performance 
differences these benchmarks seem useful, and when I picked one to look 
at (the Mandelbrot one) it wasn't obvious that there was a good reason 
why the Java runtime should be 2.2x faster.

 > Significantly?
What's significant is open to interpretation. As I said in my other 
reply, I'm a Ruby guy, so I'm not often arguing about performance ;-) 
However 20%+ slower execution is significant to us (the group I work 
in), if the Java and C# source is essentially comparable. I don't see a 
good reason why the Mono versions are significantly slower either, I 
assume the runtime/compiler in mono is less mature (that's a guess, I 
sent this email in the hope I would be enlightened).

 > These 2 programs
> (pidigits & regex-dna) are slow on Mono regardless of the
> language Mono is compared with.
> BTW, Java's pidigits uses native calls to gmplib (http://gmplib.org/).
> This is called cheating ;-)
OK, let's say they're special cases. That's fine. It still doesn't 
explain why Java is 20%+ faster in most of the benchmarks though. For my 
money it should be the same, or (if claims about CIL versus byte code 
are to be believed) Mono should be faster.

-Rob

-- 
The generation of random numbers is too important to be left to chance.
-- R. Coveyou


More information about the Mono-list mailing list