RFR: 8173585: Intrinsify StringLatin1.indexOf(char) [v4]
Jason Tatton
github.com+70893615+jasontatton-aws at openjdk.java.net
Thu Oct 8 06:55:53 UTC 2020
On Tue, 6 Oct 2020 20:18:02 GMT, Nils Eliasson <neliasso at openjdk.org> wrote:
>> Jason Tatton has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8173585: Intrinsify StringLatin1.indexOf(char)
>>
>> Rewrite of unit test and newlines added to end of files
>>
>> Changes to unit test:
>> - main test adjusted such that Strings gennerated are much longer (up to
>> 2048 characters) and of the form: azaza, aazaazaa, aaazaaazaaa, etc with
>> 'z' being the search character searched for. Multiple instances of the
>> search character are included in the String in order to validate that
>> the starting offset is correctly handleded. Results are compared to non
>> intrinsified version of the code. Longer strings means that the looping
>> functionality of the various paths is entered into.
>> - Run configurations introduced such that it checks behaviour where use
>> of SSE and AVX instructions are restricted.
>> - Tier4InvocationThreshold adjusted so as to ensure C2 code iis invoked.
>>
>> Other changes:
>> - newlines added at end of files
>
> test/hotspot/jtreg/compiler/intrinsics/string/TestStringLatin1IndexOfChar.java line 25:
>
>> 23: import jdk.test.lib.Asserts;
>> 24:
>> 25: public class TestStringLatin1IndexOfChar{
>
> Can you please add testing for these edge cases:
> - when the search char is the first char
> - when the search char is the last char
> - when the string has length 1
Thanks for reviewing this. I have added a new test: `findOneItem` which covers these edge cases
-------------
PR: https://git.openjdk.java.net/jdk/pull/71
More information about the core-libs-dev
mailing list