
Featured · Runtime
What the JIT Actually Does to Your Hot Loop
Tiered compilation, on-stack replacement and inlining decide how your loop really runs. Here is how to read those decisions instead of guessing.
Marcus Venn
Deep technical writing about the JVM and its ecosystem.

Featured · Runtime
Tiered compilation, on-stack replacement and inlining decide how your loop really runs. Here is how to read those decisions instead of guessing.

Memory
One run, one quantity, three answers. The allocation rate everyone derives from the default GC log is ten per cent low, and the log says why if you ask it correctly.

Runtime
The same pipeline cost 7.05 times the loop over eight elements and 1.31 times over a million. The ratio everyone quotes is a measurement at a trip count.

Runtime
Identical source, five call sites, one JDK 26 run - nothing allocated at the first and twelve bytes at three others. The wrapper is not what decides.

Diagnostics
Sixty seconds of default settings produced 4.3 MB, three quarters of it one event type, and none of it answered whether the application was lock-contended.

Runtime
One collection, reported as 2.275 ms by the GC log and 29.6 ms by the safepoint log. The gap is time to safepoint, and each instrument hides a different part of it.

Runtime
A hello-world program loads 423 classes before it prints anything. Where they come from, what the JVM does to each one, and how to see it.