A JVM developer called John Rose from Sun Microsystems recently claimed on a
mailing list that Sun's JVM offers C-like performance whereas .NET only
offers performance comparable to old JVM implementations:
http://groups.google.com/group/jvm-l...ee4b7f74c93ded
I thought I'd test this by running the Java and C# implementations of the
commonly-cited SciMark benchmark. At first sight, Sun's JDK 6 was 5% faster
than .NET 3.5.
However, I noticed that the performance of the Monte Carlo section of the
benchmark was almost 10x slower in C# than Java according to Sun's results:
http://blogs.sun.com/dagastine/entry...s_faster_than1
Hmm, fishy. :-)
Studying the code it turns out that the "Monte Carlo" section of the
benchmark was actually testing the VMs ability to remove unnecessary locks
from code. If you remove the lock by hand (after all, it has absolutely
nothing whatsoever to do with scientific computing) then .NET 3.5 is 3%
faster than Sun's JDK 1.6. There, that's better.
Incidentally, has anyone benchmarked numerical code on 64-bit vs
32-bit .NET?
--
Dr Jon D Harrop, Flying Frog Consultancy
http://www.ffconsultancy.com/products/?u