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

Partial in-lining for vectorized mismatch operation using AVX512 masked instructions

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 17
    • 17
    • hotspot
    • None
    • b26
    • x86

      ArraySupport.vectorizedMismatch is a leaf level comparison routine which gets called by various public Java APIs (Arrays.equals, Arrays.mismatch).
      Hotspot C2 compiler intrinsifies vectorizedMismatch routine and emits a call to a stub routine which uses vector instruction to compare the inputs.

      For small compare operation whose size fits in one vector register i.e. < 32 bytes or <= 64 bytes, compiler can employ partial in-lining technique to emit the fast path code at the call site which does vector comparison under the influence of a predicate register/mask computed a function of comparison length.

      If the length of comparison is greater than the vector register size then the slow path comprising of stub call could be taken.

      This shall prevent the call overhead associated with stub call which could be significant compared to actual comparison operation for small sized comparisons.

            jbhateja Jatin Bhateja
            jbhateja Jatin Bhateja
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: