On Fri, 2 Feb 2024 13:54:46 GMT, Claes Redestad <redes...@openjdk.org> wrote:
> This patch streamlines and specializes various `String::indexOf` methods. > Mainly avoids the need for clamping and doing checks that are redundant in > almost all cases, moving the checks to the API boundary where they are > needed. > > This improves performance both at peak and during startup/warmup. Since > indexOf is heavily used in bootstrapping code it makes sense to slightly dial > back abstraction and delegation, which in this case also brought some benefit > to peak performance. > > Testing: tier1-3 This pull request has now been integrated. Changeset: 19e92201 Author: Claes Redestad <redes...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/19e92201b4873954c04cead9a3a456445b3ef289 Stats: 38 lines in 4 files changed: 19 ins; 15 del; 4 mod 8325169: Reduce String::indexOf overheads Reviewed-by: rriggs, rgiulietti, mli ------------- PR: https://git.openjdk.org/jdk/pull/17685