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

David Lloyd david.lloyd at redhat.com
Fri Dec 15 21:01:43 UTC 2017

I'm not a reviewer, but I was curious about this change; unfortunately
the diff seems to be dominated by case and formatting changes making
the actual functional aspect change hard to divine.

Within the JBoss unit we have an informal policy that formatting
changes should be presented separately so that it's easier to trace
back problems in the future, as well as being much easier to review
the change in the first place.  Would I be stepping out of bounds to
suggest that this change should be similarly divided?

On Fri, Dec 15, 2017 at 2:29 PM, Paul Sandoz <paul.sandoz at oracle.com> wrote:
> Hi,
> 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).
> Thanks,
> Paul.


More information about the core-libs-dev mailing list