On 18/12/2017 20:55, Paul Sandoz wrote:
:
There is already an assert, perhaps i can simplify this:

1) StringCharBuffer does not require special overrides.

2) Update the mismatch method:

static int mismatch(CharBuffer a, int aOff, CharBuffer b, int bOff, int length) 
{
     int i = 0;
     // Ensure only heap or off-heap buffer instances use the
     // vectorized mismatch. If either buffer is a StringCharBuffer
     // (order is null) then the slow path is taken
     if (length > 3 && a.charRegionOrder() == b.charRegionOrder()
             && a.charRegionOrder() != null && b.charRegionOrder() != null) {

I updated the webrev in place (i also updated the test to test big vs. little 
endian).
When I looked at it yesterday the CharBuffer version of mismatch wasn't checking both bases (or maybe I just mis-read it).

Anyway, it looks good now and I see the other bug updated to list clarifying the compareTo specs too.

-Alan

Reply via email to