-
Enhancement
-
Resolution: Unresolved
-
P3
-
18, 21, 24
When investigating performance of memory segment in worst case scenario (accessing segments from an array which contains different segment kinds), I noticed that:
1. ByteBuffer seems to fare better in this extreme condition (probably because ByteBuffer doesn't have a shared path for all buffer kinds)
2. The performance of the MemorySegment benchmark gets significantly better by disabling tiered compilation (which is something we observed in other benchmarks as well).
Here are the numbers:
Normal setup (no additional flags):
Benchmark (pollute) Mode Cnt Score Error Units
LoopOverPollutedArray.buffer_loop false avgt 30 0.794 ? 0.005 ms/op
LoopOverPollutedArray.buffer_loop true avgt 30 23.178 ? 0.228 ms/op
LoopOverPollutedArray.segment_loop false avgt 30 0.746 ? 0.008 ms/op
LoopOverPollutedArray.segment_loop true avgt 30 74.605 ? 0.449 ms/op
-XX:-TieredCompilation
Benchmark (pollute) Mode Cnt Score Error Units
LoopOverPollutedArray.buffer_loop false avgt 30 0.801 ? 0.005 ms/op
LoopOverPollutedArray.buffer_loop true avgt 30 23.362 ? 0.298 ms/op
LoopOverPollutedArray.segment_loop false avgt 30 0.760 ? 0.014 ms/op
LoopOverPollutedArray.segment_loop true avgt 30 49.832 ? 0.344 ms/op
1. ByteBuffer seems to fare better in this extreme condition (probably because ByteBuffer doesn't have a shared path for all buffer kinds)
2. The performance of the MemorySegment benchmark gets significantly better by disabling tiered compilation (which is something we observed in other benchmarks as well).
Here are the numbers:
Normal setup (no additional flags):
Benchmark (pollute) Mode Cnt Score Error Units
LoopOverPollutedArray.buffer_loop false avgt 30 0.794 ? 0.005 ms/op
LoopOverPollutedArray.buffer_loop true avgt 30 23.178 ? 0.228 ms/op
LoopOverPollutedArray.segment_loop false avgt 30 0.746 ? 0.008 ms/op
LoopOverPollutedArray.segment_loop true avgt 30 74.605 ? 0.449 ms/op
-XX:-TieredCompilation
Benchmark (pollute) Mode Cnt Score Error Units
LoopOverPollutedArray.buffer_loop false avgt 30 0.801 ? 0.005 ms/op
LoopOverPollutedArray.buffer_loop true avgt 30 23.362 ? 0.298 ms/op
LoopOverPollutedArray.segment_loop false avgt 30 0.760 ? 0.014 ms/op
LoopOverPollutedArray.segment_loop true avgt 30 49.832 ? 0.344 ms/op