Parallel GC and array object layout: way off the base and laid out in reverse?

Igor Veresov iggy.veresov at gmail.com
Wed Sep 4 14:01:19 PDT 2013


On Sep 4, 2013, at 1:33 PM, Tony Printezis <tprintezis at twitter.com> wrote:
> 
> G1 should also have depth-first copying (Igor, didn't you implement it?) so it should behave similarly to PS.

I did and it should, but I vaguely remember that I may be switching to breadth-first for arrays to get a better layout (Aleksey says there's no reordering with G1). Or not..  I'll have to check, it's been quite a while and these memories had been definitely swapped out. :)

> 
> Performance of forward array iteration might or might not be important. For hash tables, it's all about look-ups, so the order should not matter. It should only matter if you do a lot of whole array traversals. It might be important for something like ArrayLists.

Might not notice anything on modern x86, prefetchers work for reverse iteration equally good (at least for the cases when the array is large and it has time to learn the pattern).

igor




More information about the hotspot-gc-dev mailing list