Comparison To Other Languages
Objectively comparing the performance of a Java program and another equivalent one written in another programming language such as C++ requires a carefully and thoughtfully constructed benchmark which compares programs expressing algorithms written in as identical a manner as technically possible. The target platform of Java's bytecode compiler is the Java platform, and the bytecode is either interpreted or compiled into machine code by the JVM. Other compilers almost always target a specific hardware and software platform, producing machine code that will stay virtually unchanged during its execution. Very different and hard-to-compare scenarios arise from these two different approaches: static vs. dynamic compilations and recompilations, the availability of precise information about the runtime environment and others.
Java is often Just-in-time compiled at runtime by the Java Virtual Machine, but may also be compiled ahead-of-time, just like C++. When Just-in-time compiled, its performance is generally:
- slower than compiled languages such as C or C++,
- similar to other Just-in-time compiled languages such as C#,
- much faster than languages without an effective native-code compiler (JIT or AOT), such as Perl, Ruby, PHP and Python.
Read more about this topic: Java Performance
Famous quotes containing the words comparison to, comparison and/or languages:
“In comparison to the French Revolution, the American Revolution has come to seem a parochial and rather dull event. This, despite the fact that the American Revolution was successfulrealizing the purposes of the revolutionaries and establishing a durable political regimewhile the French Revolution was a resounding failure, devouring its own children and leading to an imperial despotism, followed by an eventual restoration of the monarchy.”
—Irving Kristol (b. 1920)
“Envy and jealousy are the private parts of the human soul. Perhaps the comparison can be extended.”
—Friedrich Nietzsche (18441900)
“People in places many of us never heard of, whose names we cant pronounce or even spell, are speaking up for themselves. They speak in languages we once classified as exotic but whose mastery is now essential for our diplomats and businessmen. But what they say is very much the same the world over. They want a decent standard of living. They want human dignity and a voice in their own futures. They want their children to grow up strong and healthy and free.”
—Hubert H. Humphrey (19111978)