Search code examples
java.netcomparisonjitjvm-hotspot

.NET runtime vs. Java Hotspot: Is .NET one generation behind?


According to the information I could gather on .NET and Java execution environment, the current state of affairs is follows:

Benchmarks aside and with no intention to escalate holy wars, does this mean that Java Hotspot VM is one generation ahead of .Net. Will these technologies employed at Java VM eventually find its way into .NET runtime?


Solution

  • I've never benchmarked the two to compare, and I'm more familiar with the Sun JVM, I can only speak in general terms about JITs.

    There are always tradeoffs with optimizations, and not all optimizations work all the time. However, here are some modern JIT techniques. I think this can be the beginning of a good conversation if we stick to the technical stuff:

    There's also features that are helpful as far as good implementations of a VM go:

    • being able to pick between GC
    • implementations customization of each GC
    • heap allocation parameters (such as growth)
    • page locking

    Based on these features and many more, we can compare VMs, and not just "Java" versus ".NET" but, say, Sun's JVM versus IBM's JVM versus .NET versus Mono.

    For example, Sun's JVM doesn't do tail-call optimization, IIRC, but IBM's does.