RFR: 8320448: Accelerate IndexOf using AVX2 [v19]

Volodymyr Paprotski duke at openjdk.org
Wed May 15 20:26:17 UTC 2024


On Wed, 15 May 2024 19:21:37 GMT, Volodymyr Paprotski <duke at openjdk.org> wrote:

>> Scott Gibbons has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Rearrange; add lambdas for clarity
>
> test/jdk/java/lang/StringBuffer/IndexOf.java line 47:
> 
>> 45:   char[] haystack_16 = new char[128];
>> 46: 
>> 47:   for (int i = 0; i < 128; i++) {
> 
> you can use `char` instead of `int` as iterator

combine into single loop
haystack[i] = (char) i;
haystack_16[i] = (char) (i + 256);

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

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


More information about the core-libs-dev mailing list