RFR: 8320448: Accelerate IndexOf using AVX2 [v19]

Scott Gibbons sgibbons at openjdk.org
Fri May 24 19:55:40 UTC 2024


On Fri, 24 May 2024 18:32:53 GMT, Volodymyr Paprotski <duke at openjdk.org> wrote:

>> Fixed
>
> (missed a `git add`? don't see the updates for this file)

Hmmm... Not sure what happened.

>> Since we're only concerned with the delta of performance, does this really matter?  Can you suggest an alternative?
>
> The needle really should be like the all the other strings, e.g. `dataStringHuge` itself, generated by the setup. 
> 
> As to weather it really matters; the answer is Amdahl's law. You can indeed measure the delta, but you can't measure the speedup of just the indexOf; not with repeat and concatenation obscuring the numbers.

I have to believe that any relatively smart compiler would recognize that as a compile-time constant and make the change irrelevant.  I've yielded to your desire and changed the code.

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

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


More information about the core-libs-dev mailing list