[11] RFR 8193085 Vectorize the nio Buffer equals and compareTo implementations

Paul Sandoz paul.sandoz at oracle.com
Fri Dec 15 20:29:16 UTC 2017


Please review this patch to vectorize the buffer equals and compareTo implementations, using the same approach that was used for arrays:

  http://cr.openjdk.java.net/~psandoz/jdk/JDK-8193085-buffer-equals-compareTo-vectorize/webrev/ <http://cr.openjdk.java.net/~psandoz/jdk/JDK-8193085-buffer-equals-compareTo-vectorize/webrev/>

This patch expands on using the double address mode of unsafe to uniformly access a memory region covered by a buffer be it on or off heap. Only buffers with the same endianness can support optimized equality and comparison.


A follow on issue will explore a mismatch method (thus enabling support for float/double comparison that is compatible with arrays), and equals/compareTo methods that accept absolute positions (to avoid the dup.pos.limit.slice dance).


More information about the core-libs-dev mailing list