RFR: 8320448: Accelerate IndexOf using AVX2 [v51]

Scott Gibbons sgibbons at openjdk.org
Thu May 30 16:16:45 UTC 2024


On Thu, 30 May 2024 16:03:29 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Scott Gibbons has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix bug number in tests
>
> src/hotspot/cpu/x86/c2_stubGenerator_x86_64_string.cpp line 2:
> 
>> 1: /*
>> 2:  * Copyright (c) 2023, 2024 Intel Corporation. All rights reserved.
> 
> Is the 2023 year intentional? I don't know your policy, so you can just ignore this ;)

I started this in November :-)

> src/hotspot/cpu/x86/c2_stubGenerator_x86_64_string.cpp line 334:
> 
>> 332:   // NUMBER_OF_CASES (currently 10) needle sizes for both big and small.  There are special
>> 333:   // routines for handling needle sizes > NUMBER_OF_CASES (L_{big,small}CaseDefault).  These
>> 334:   // cases use C@'s arrays_equals() to compare the needle to the haystack.  The small cases
> 
> Suggestion:
> 
>   // cases use C2's arrays_equals() to compare the needle to the haystack.  The small cases
> 
> Randomly spotted this.

Fixed.

> src/hotspot/cpu/x86/c2_stubGenerator_x86_64_string.cpp line 773:
> 
>> 771:     // jae done
>> 772:     //
>> 773:     // Final index of start of needle @((16 - (ndlLen %16)) & 0xf) << 1
> 
> What is the meaning of the `@`? Maybe `at`. I'd use the same consistently

Changed to "at".

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

PR Review Comment: https://git.openjdk.org/jdk/pull/16753#discussion_r1621034441
PR Review Comment: https://git.openjdk.org/jdk/pull/16753#discussion_r1621034583
PR Review Comment: https://git.openjdk.org/jdk/pull/16753#discussion_r1621034821


More information about the core-libs-dev mailing list