Re: RFR: JDK-8262994: Refactor String.split to help method inlining [v2]

2023-01-29 Thread Christian Wimmer
On Sun, 29 Jan 2023 16:07:08 GMT, Peter Levart wrote: >> Christian Wimmer has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add comment about method inlining > > Hi Christian, I can sponsor to pull this change if you like. @plevart yes p

Re: RFR: JDK-8262994: Refactor String.split to help method inlining [v2]

2023-01-29 Thread Peter Levart
On Mon, 9 Jan 2023 20:04:34 GMT, Christian Wimmer wrote: >> The method `String.split` contains a fast-path when the regular expression >> parameter is not really a regular expression, but just a single split >> character. >> This fast path vs. slow path check can be constant folded when the reg

Re: RFR: JDK-8262994: Refactor String.split to help method inlining [v2]

2023-01-23 Thread Naoto Sato
On Mon, 9 Jan 2023 20:04:34 GMT, Christian Wimmer wrote: >> The method `String.split` contains a fast-path when the regular expression >> parameter is not really a regular expression, but just a single split >> character. >> This fast path vs. slow path check can be constant folded when the reg

Re: RFR: JDK-8262994: Refactor String.split to help method inlining [v2]

2023-01-23 Thread Peter Levart
On Mon, 9 Jan 2023 20:04:34 GMT, Christian Wimmer wrote: >> The method `String.split` contains a fast-path when the regular expression >> parameter is not really a regular expression, but just a single split >> character. >> This fast path vs. slow path check can be constant folded when the reg

Re: RFR: JDK-8262994: Refactor String.split to help method inlining [v2]

2023-01-23 Thread Christian Wimmer
On Mon, 9 Jan 2023 20:04:34 GMT, Christian Wimmer wrote: >> The method `String.split` contains a fast-path when the regular expression >> parameter is not really a regular expression, but just a single split >> character. >> This fast path vs. slow path check can be constant folded when the reg

Re: RFR: JDK-8262994: Refactor String.split to help method inlining

2023-01-09 Thread Christian Wimmer
On Wed, 28 Dec 2022 20:42:15 GMT, Sergey Tsypanov wrote: > Is there any benchmark proving the benefit? The Graal compiler can do the inlining and constant folding. That is especially important when doing AOT compilation as part of GraalVM Native Image builds, in which case the regular expressi

Re: RFR: JDK-8262994: Refactor String.split to help method inlining [v2]

2023-01-09 Thread Christian Wimmer
On Tue, 27 Dec 2022 23:36:52 GMT, Ismael Juma wrote: >> Christian Wimmer has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add comment about method inlining > > src/java.base/share/classes/java/lang/String.java line 3133: > >> 3131:

Re: RFR: JDK-8262994: Refactor String.split to help method inlining [v2]

2023-01-09 Thread Christian Wimmer
> The method `String.split` contains a fast-path when the regular expression > parameter is not really a regular expression, but just a single split > character. > This fast path vs. slow path check can be constant folded when the regular > expression parameter is a literal constant - a quite fr

Re: RFR: JDK-8262994: Refactor String.split to help method inlining

2022-12-28 Thread Sergey Tsypanov
On Tue, 27 Dec 2022 20:12:51 GMT, Christian Wimmer wrote: > The method `String.split` contains a fast-path when the regular expression > parameter is not really a regular expression, but just a single split > character. > This fast path vs. slow path check can be constant folded when the regula

Re: RFR: JDK-8262994: Refactor String.split to help method inlining

2022-12-27 Thread Ismael Juma
On Tue, 27 Dec 2022 20:12:51 GMT, Christian Wimmer wrote: > The method `String.split` contains a fast-path when the regular expression > parameter is not really a regular expression, but just a single split > character. > This fast path vs. slow path check can be constant folded when the regula

RFR: JDK-8262994: Refactor String.split to help method inlining

2022-12-27 Thread Christian Wimmer
The method `String.split` contains a fast-path when the regular expression parameter is not really a regular expression, but just a single split character. This fast path vs. slow path check can be constant folded when the regular expression parameter is a literal constant - a quite frequent patt