[lworld] Improve performance of Flat array var handles

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P3
    • repo-valhalla
    • Affects Version/s: repo-valhalla
    • Component/s: core-libs

      Unsafe.compareAndSetFlatValueAsBytes is slow, due to:

      1. Array var handles must specialize and hold layout as a constant for C2
      2. Need minimum arrayLayout0 and newSpecialArray C2 intrinsics for hot compareAndSetFlatValueAsBytes

      Old:

      This issue's purpose is to keep track of a potential performance regression introduced with JDK-8351569 (and discovered while investigating JDK-8343420). JDK-8351569 introduced a new overloaded version of Unsafe::getAndSet that is not intrinsified (which is used by e.g. VarHandle::getAndSet). We should evaluate how much of a performance impact this can have and potentially intrinsify it or make it call the intrinsified version.

            Assignee:
            Chen Liang
            Reporter:
            Damon Fenacci
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: