RFR: 8254807: Optimize startsWith() for String.substring()
Xin Liu
xliu at openjdk.java.net
Sat Oct 31 05:28:07 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 an use of substring. hopefully c2 optimizer can remove the used substring()
-------------
Commit messages:
- fix a regression test on x86_32
- 8254807: Optimize startsWith() for String.substring()
- 8254807: Optimize startsWith() for String.substring()
- 8254807: Optimize startsWith() for String.substring()
- 8254807: Optimize startsWith() for String.substring()
- 8254807: Optimize startsWith() for String.substring()
- 8254807: Optimize startsWith() for String.substring()
Changes: https://git.openjdk.java.net/jdk/pull/974/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=974&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8254807
Stats: 538 lines in 15 files changed: 472 ins; 56 del; 10 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