-
Bug
-
Resolution: Duplicate
-
P3
-
18
The attached benchmark shows a hot loop in which some objects are allocated as intermediate computations, but are then thrown away, as the loop is interested in a value that should really be scalarized.
I noticed that EA behavior for this benchmark is erratic: if one of the objects being created has a superclass, then EA won't work, even though the benchmark doesn't touch any of the superclass fields.
If the object hierarchy is flattened, EA works as expected, and the benchmark becomes considerably faster.
Benchmark Mode Cnt Score Error Units
PointerBenchmarkAnon.test avgt 30 4.836 ± 0.067 ms/op
PointerBenchmarkAnon.testFlat avgt 30 0.242 ± 0.003 ms/op
I noticed that EA behavior for this benchmark is erratic: if one of the objects being created has a superclass, then EA won't work, even though the benchmark doesn't touch any of the superclass fields.
If the object hierarchy is flattened, EA works as expected, and the benchmark becomes considerably faster.
Benchmark Mode Cnt Score Error Units
PointerBenchmarkAnon.test avgt 30 4.836 ± 0.067 ms/op
PointerBenchmarkAnon.testFlat avgt 30 0.242 ± 0.003 ms/op
- duplicates
-
JDK-8276455 C2: iterative EA
- Resolved