Re: RFR: 8309191: Reduce JDK dependencies of cgroup support

2023-06-13 Thread Christian Wimmer
On Thu, 1 Jun 2023 12:11:29 GMT, Alan Bateman wrote: > It's easy to introduce a new change to this code which accidentally drags in > some of those (unwanted) dependencies again. We (as the Native Image team) are OK with this. Our testing will detect that pretty quickly, and then the new code

Re: RFR: 8300543 Compiler Implementation for Pattern Matching for switch

2023-04-14 Thread Christian Wimmer
On Fri, 17 Mar 2023 12:15:58 GMT, Jan Lahoda wrote: > This is the first draft of a patch for JEP 440 and JEP 441. Changes included: > > - the pattern matching for switch and record patterns features are made > final, together with updates to tests. > - parenthesized patterns are removed. >

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

2023-01-30 Thread Christian Wimmer
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

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 chan

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

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

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/Str

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

2023-01-09 Thread Christian Wimmer
l fast-path splitting logic into a separate method solves this problem: > the JIT or AOT compiler can inline `String.split`, constant-fold the > fast/slow path check, and then only the invoke of either the fast path or the > slow path remains. Christian Wimmer has updated the pull request incremental

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