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

[REDO] [vectorapi] Refactor VectorShuffle implementation

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • P4
    • 23
    • 22
    • core-libs
    • b19

    Description

      Currently, VectorShuffle is stored as a byte array, and would be expanded upon usage. This poses several drawbacks:

      1, Inefficient conversions between a shuffle and its corresponding vector. This hinders the performance when the shuffle indices are not constant and are loaded or computed dynamically.
      2, Redundant expansions in rearrange operations. On all platforms, it seems that a shuffle index vector is always expanded to the correct type before executing the rearrange operations.
      3, Some redundant intrinsics are needed to support this handling as well as special considerations in the C2 compiler.
      4, Range checks are performed using toVector, which is inefficient for FP types since both FP conversions and FP comparisons are more expensive than the integral ones.

      As a result, I propose to implement VectorShuffle as an array of the bit type (a.k.a the integral type that has the same size as the element type).

      Attachments

        Issue Links

          Activity

            People

              qamai Quan Anh Mai
              thartmann Tobias Hartmann
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: