RFR: 8282664: Unroll by hand StringUTF16 and StringLatin1 polynomial hash loops [v2]
Claes Redestad
redestad at openjdk.java.net
Tue Mar 8 17:04:00 UTC 2022
On Tue, 8 Mar 2022 15:36:22 GMT, Quan Anh Mai <duke at openjdk.java.net> wrote:
> Can we change the optimizer so that the strength reduction happens only after all transformations have settled? Carelessly changing a multiplication to a shift as today may hurt a lot of potential optimisations. Thanks.
Yes, it's troubling that making a constant non-foldable can lead the JIT down a path that ultimately pessimizes the end result (as observed here). If we could train the JIT to avoid this pitfall and get to the improvement observed in my experiment here without any changes to `String.java` then that'd be great.
-------------
PR: https://git.openjdk.java.net/jdk/pull/7700
More information about the core-libs-dev
mailing list