Re:GlueList – Fast New Java List Implementation
by Kymps on Friday August 12, 2016 @08:16AM
(#12274970)
Does it actually matter that much in Java? In Java, a collection of objects is already a collection of pointers, so wouldn't we get a fair number of cache misses anyway? Or does the JVM have some cool mechanism to minimize those?
[ Parent
| on HN ]
Re:GlueList – Fast New Java List Implementation
by joajoa on Friday August 12, 2016 @11:35AM
(#12276494)
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.