2 ms·
With Java, and any other VM that doesn't specify an exact GC algorithm, it always depends. IIRC the train algorithm used in some JVMs improves locality. Most G
by joajoa 10y ago
With Java, and any other VM that doesn't specify an exact GC algorithm, it always depends.
IIRC the train algorithm used in some JVMs improves locality. Most GCs use a pointer-bump scheme anyways, leading to pretty good locality for objects that have been created together.
So yes, the JVM _may_ have some pretty cool mechanisms to minimize those. I would be also interested in G1s behavior and whether or not it improves locality somehow.