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

Aarch64: Use Neon in intrinsics for String.equals

XMLWordPrintable

    • aarch64
    • generic

      Now we use 64-bits comparsion in MacroAssembler::string_equals, we can use neon instructions to improve the intrinsic's performance.

      // Compare Strings

      // For Strings we're passed the address of the first characters in a1
      // and a2 and the length in cnt1.
      // elem_size is the element size in bytes: either 1 or 2.
      // There are two implementations. For arrays >= 8 bytes, all
      // comparisons (including the final one, which may overlap) are
      // performed 8 bytes at a time. For strings < 8 bytes, we compare a
      // halfword, then a short, and then a byte.

      void MacroAssembler::string_equals(Register a1, Register a2,
                                         Register result, Register cnt1, int elem_size)

            whuang Wang Huang
            whuang Wang Huang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: