RFR: 8254807: Optimize startsWith() for String.substring() [v5]
Xin Liu
xliu at openjdk.java.net
Mon Dec 14 06:10:13 UTC 2020
> The optimization transforms code from s=substring(base, beg, end); s.startsWith(prefix)
> to substring(base, beg, end) | base.startsWith(prefix, beg).
>
> it reduces uses of substring. hopefully c2 optimizer can remove the used substring.
Xin Liu has updated the pull request incrementally with one additional commit since the last revision:
fix build failure after merging
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/974/files
- new: https://git.openjdk.java.net/jdk/pull/974/files/60491ffc..f96e87c7
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=974&range=04
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=974&range=03-04
Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
Patch: https://git.openjdk.java.net/jdk/pull/974.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/974/head:pull/974
PR: https://git.openjdk.java.net/jdk/pull/974
More information about the hotspot-compiler-dev
mailing list