Does HotSpot perform strength reduction on array indexing in a loop?

Johan Tibell johan.tibell at gmail.com
Tue Dec 7 04:50:21 PST 2010


Hi,

Does HotSpot perform strength reduction on array indexing in a loop?
In other words, does it optimize array indexing (i.e. base + offset *
elem size) to pointer arithmetic (curr_ptr + elem_size)? If it does,
how does it do so in presence of GC, which could invalidate the
pointer?

Cheers,
Johan


More information about the hotspot-dev mailing list