RFR: 8320448: Accelerate IndexOf using AVX2 [v19]

Sandhya Viswanathan sviswanathan at openjdk.org
Fri May 17 22:40:15 UTC 2024


On Thu, 16 May 2024 20:22:40 GMT, Scott Gibbons <sgibbons at openjdk.org> wrote:

>> src/hotspot/cpu/x86/stubGenerator_x86_64_string.cpp line 1510:
>> 
>>> 1508:   compare_big_haystack_to_needle(sizeKnown, size, NUMBER_OF_NEEDLE_BYTES_TO_COMPARE, loop_top, hsPtrRet, hsLength,
>>> 1509:                                  needleLen, isU, DO_EARLY_BAILOUT, eq_mask, temp2, r10, _masm);
>>> 1510: 
>> 
>> At this point hsLength is not the remaining length from hsPtrRet, would that cause a problem? If not, all the special paths in compare_big_haystack_to_needle need not be generated on this call.
>
> Not sure what you mean here.  I *think* you mean that hsLength is not the length of the remaining bytes in the haystack, but the actual length.  There may be an issue if that is correct, right?  I'll investigate.

Yes, that is what I meant. Thanks for investigating.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16753#discussion_r1605594796


More information about the core-libs-dev mailing list