Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8279581

Polluted memory segment access is faster with tiered compilation disabled

XMLWordPrintable

      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

            roland Roland Westrelin
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: