If bytecode is compiled in 1.4, can we still get the performance improvement of Java 6

I assume that after browsing this document, there is a huge performance difference between Java 1.4 and Java 6

My question is, is the Java 6 runtime still magical when the bytecode that Java must run is compiled in 1.4?

Some of the background is "why this problem?" It's here

Solution

Yes, because most optimizations are done by the JVM at runtime, the compiler does little in optimization Therefore, code compiled with the old java compiler will still benefit from the new JVM

However, some optimizations were performed at compile time, such as replacing consecutive string connections with StringBuilder

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>