RFR: 8254807: Optimize startsWith() for String.substring() [v3]
Xin Liu
xliu at openjdk.java.net
Sat Dec 12 08:49:17 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:
use a brand new CallNode instead of overloading the startsWith.
set_bci to -1 so we skip symbolic info validation
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/974/files
- new: https://git.openjdk.java.net/jdk/pull/974/files/2543aa88..b8ef8ce7
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=974&range=02
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=974&range=01-02
Stats: 41 lines in 4 files changed: 10 ins; 9 del; 22 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