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

[lworld] C2 Doesn't hoist array reference load out of the loop

XMLWordPrintable

    • 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.

            qamai Quan Anh Mai
            skuksenko Sergey Kuksenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: