RFR: 8369039: JDK-8348611 caused regression in Javac-Hot-Generate [v2]

Claes Redestad redestad at openjdk.org
Tue Oct 7 18:10:14 UTC 2025


On Tue, 7 Oct 2025 17:42:32 GMT, Archie Cobbs <acobbs at openjdk.org> wrote:

>> The refactoring in [JDK-8348611](https://bugs.openjdk.org/browse/JDK-8348611) caused a regression in compiler performance. In the the refactoring there were a couple of simple optimizations that were missed. When put in place, these seem to (mostly) address the performance issue.
>
> Archie Cobbs has updated the pull request incrementally with two additional commits since the last revision:
> 
>  - Unstream loops.
>  - Put back the drive-by tweaks; they seem to matter.

FYI I'm not a core maintainer/reviewer of javac but specialize on isolating and figuring out causes of performance regressions; you're free to keep the streams in in favor of perceived code clarity if you make the case that impact on performance is negligible. 

Transient allocation pressure can be a non-issue on one system but cause a lot of GC pauses and slowdown on another, so it's one of those things I like to keep tabs on when diagnosing a regression. Ideally we shouldn't increase allocation pressure too much. On one system I was looking at the Score was way worse after 26-b12 and didn't improve that much with this PR. On your system it seems the allocation pressure isn't a large contributor to Score. YMMV.

I'll look at the numbers on your latest version. 

(FWIW I ran an experiment baselined on an earlier state of this PR and posted it here https://github.com/archiecobbs/jdk/pull/1 -- that showed that desugaring all the streams in LintMapper got allocation pressure down below 26-b11 levels)

-------------

PR Comment: https://git.openjdk.org/jdk/pull/27651#issuecomment-3378011583


More information about the compiler-dev mailing list