RFR: 8320448: Accelerate IndexOf using AVX2 [v6]

Scott Gibbons sgibbons at openjdk.org
Wed May 22 14:53:30 UTC 2024


On Tue, 9 Jan 2024 15:14:41 GMT, Emanuel Peter <epeter at openjdk.org> wrote:

>> Scott Gibbons has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 21 commits:
>> 
>>  - Merge branch 'openjdk:master' into indexof
>>  - Addressing review comments.
>>  - Fix for JDK-8321599
>>  - Support UU IndexOf
>>  - Only use optimization when EnableX86ECoreOpts is true
>>  - Fix whitespace
>>  - Merge branch 'openjdk:master' into indexof
>>  - Comments; added exhaustive-ish test
>>  - Subtracting 0x10 twice.
>>  - Stomped on r13 in switch branch calculation
>>  - ... and 11 more: https://git.openjdk.org/jdk/compare/8a4dc79e...600377b0
>
> test/jdk/java/lang/StringBuffer/IndexOf.java line 34:
> 
>> 32: public class IndexOf {
>> 33: 
>> 34:   static Random generator = new Random(1999);
> 
> Would it be an alternative to use the this:
> 
> import jdk.test.lib.Utils;
> ...
> Random random = Utils.getRandomInstance();
> 
> This has a random seed, but it is always printed in the output and can be set via a test-flag.

Changed.

> test/jdk/java/lang/StringBuffer/IndexOf.java line 44:
> 
>> 42:     }
>> 43:     System.out.println("");
>> 44:     generator.setSeed(1999);
> 
> Is there a good reason for a fixed seed?

Nope :-). Needed consistency during testing.

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

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


More information about the hotspot-compiler-dev mailing list