3 ms·
There is no stop the world point. There are compilation threads always running in the background patching hot code. In Java 8 tiered compilation became the def
by jnordwick 10y ago
There is no stop the world point. There are compilation threads always running in the background patching hot code.
In Java 8 tiered compilation became the default. After a first threshold is reached, a method or loop will be compiled as a first approximation with further record keeping. At the second threshold, a more aggressively optimized version without record keeping will be put in place. This is kind of like the merging of the old C1 and C2 compilers into one to help get up to speed quicker.
When you want to measure this stuff you use JMH, Java Microbenchmarking Harness, an amazing piece of work that will warmup the JVM before executing performance tests. Be very careful writing your own Java timing code, and for the most part rely on JMH.