-
Bug
-
Resolution: Unresolved
-
P3
-
repo-valhalla
-
generic
-
generic
C2 Doesn't hoist flat array reference load out of the loop for a simple loop.
That causes a huge performance difference (in comparison, when hoisting is done manually):
Benchmark Mode Cnt Score Error Units
V1Bench.sharpValueFlat avgt 10 588869.029 ± 6188.785 ns/op
V1Bench.sharpValueFlatArrayHoist avgt 10 249914.623 ± 991.713 ns/op
For the identical loop working with an array of identity classes, the load is hoisted successfully.
That causes a huge performance difference (in comparison, when hoisting is done manually):
Benchmark Mode Cnt Score Error Units
V1Bench.sharpValueFlat avgt 10 588869.029 ± 6188.785 ns/op
V1Bench.sharpValueFlatArrayHoist avgt 10 249914.623 ± 991.713 ns/op
For the identical loop working with an array of identity classes, the load is hoisted successfully.
- relates to
-
JDK-8370195 [lworld] Constant-fold _layout_kind loads from constant FlatArrayKlass
-
- Open
-