Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Differences between JVM implementations

Where do JVM Implementations differ (except licensing)? Does every JVM implement Type Erasure for the Generic handling?

Where are the differences between:

  • JRockit
  • IBM JVM
  • SUN JVM
  • Open JDK
  • Blackdown
  • Kaffe

..... Deals one of them with Tail-Call-Optimization?

like image 812
Martin K. Avatar asked Apr 14 '09 12:04

Martin K.


People also ask

Are there different implementations of Java?

There many Java implementations, many of which use the GNU Classpath library. These implementations include GNU's gcj Java compiler (part of the gcc toolsuite), Kaffe, IBM's Jikes, and IKVM.net. IKVM.net implements Java on the . NET framework (implemented by Microsoft and by Mono).

Which JVM is fastest?

For the typical (median) values, there is no significant difference between the various JDKs except for OpenJDK 11 which is about 30% slower than the other versions. The fastest of them all is GraalVM EE 17, but the difference compared to OpenJDK 8/OpenJDK 17 is marginal.

What is JVM explain JVM architecture?

JVM(Java Virtual Machine) acts as a run-time engine to run Java applications. JVM is the one that actually calls the main method present in a java code. JVM is a part of JRE(Java Runtime Environment).

What are the main operations of JVM?

JVM is specifically responsible for converting bytecode to machine-specific code and is necessary in both JDK and JRE. It is also platform-dependent and performs many functions, including memory management and security.


2 Answers

JVM implementations can differ in the way they implement JIT compiling, optimizations, garbage collection, platforms supported, version of Java supported, etc. They all must meet set of features and behaviors so that it will execute your Java bytecodes correctly.

As you've pointed out, the major difference tends to be in licensing. Other non-technical differences tend to be in free/paid support options, integration with other technologies (usually J2EE servers), and access to source code.

Note: While a J2EE server runs on the JVM, some servers have integrated tools for monitoring, analyzing, and tweaking JVM performance.

As far as technical differences, those have grown less significant over the years. Once upon a time, the IBM and JRockit JVM's had far superior performance to the reference Sun implementation. This was due to significant differences in the types of runtime optimizations, differences in garbage collection, and differences in native-code (and how much native code various classes uses). These performance differences aren't as significant anymore.

Some JVM's also include or integrate with diagnostics and monitoring tools. JRockit includes a set of tools for monitoring your JVM performance. Sun provides various JMX-based tools with overlapping features to do the same. IBM Websphere once upon a time included a similar set of tools for their whole J2EE application server (not sure if they still do, but I would assume that's still true)...

Some of the open source JVM's tend to have a little slower performance because they have been redeveloped from the ground up. As such, they've got a bit more catching up to do. Last I checked about 2 years ago, Blackdown was significantly slower (1.5x-2x?) than the Sun JVM. It was also a bit behind of supported versions of Java.

like image 140
James Schek Avatar answered Nov 15 '22 19:11

James Schek


Type erasure is a compiler function and as such JVM independent.

like image 36
Brian Agnew Avatar answered Nov 15 '22 19:11

Brian Agnew