-
Enhancement
-
Resolution: Unresolved
-
P3
-
22, 23, 24
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.
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.
- relates to
-
JDK-8338591 Improve performance of MemorySegment::copy
- Resolved