
Runtime
Streams Versus Loops: What the JIT Sees
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.
Topic
Articles on “performance”

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.

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.

Frameworks
Startup time is class loading, condition evaluation and JIT warmup in some proportion. Measure the split before reaching for a fix.

Memory
Sub-millisecond pauses are real, and they are not the whole cost. What the two collectors actually trade, and which numbers to compare instead.

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