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

ArraySupport::vectorizedMismatch should support long sizes

XMLWordPrintable

      The ArraySupport::vectorizedMismatch intrinsics is optimized for 32-bit sizes. This is understandable, given that historically this API point is only used by arrays and byte buffers (whose size cannot be larger than Integer.MAX_SIZE).

      However, MemorySegments can have a size that is expressed in `long`. The memory segment implementation has, as a result, to do a number of adaptation to slice the segment in smaller chunks, call the intrinsic on each chunk and then reconcile the results.

      Needless to say, all this logic is quite expensive, and makes the memory segment mismatch implementation slower than e.g. ByteBuffer::equals.

      It would be nice if we could improve the intrinsics to work on long sizes.

            Unassigned Unassigned
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: