Skip to content

Optimizer misc improvements - #26704

Open
SolalPirelli wants to merge 1 commit into
scala:mainfrom
dotty-staging:solal/optimizer-bounce
Open

Optimizer misc improvements#26704
SolalPirelli wants to merge 1 commit into
scala:mainfrom
dotty-staging:solal/optimizer-bounce

Conversation

@SolalPirelli

@SolalPirelli SolalPirelli commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

In support of the bounce benchmark (source):

  • Recognize loads from scala/package$ (non-null, no side effects)
  • Recognize applyVoid as a specialization of apply for functions
  • Stop making a list of which module loads can be elided and just use scala/*

With this, we can inline all foreach calls and we don't need an IntRef

Have you relied on LLM-based tools in this contribution?

No

How was the solution tested?

New automated tests (including the issue's reproducer, if applicable)

@mbovel

mbovel commented Aug 4, 2026

Copy link
Copy Markdown
Member

Benchmarks started. Workflow run.

@mbovel

mbovel commented Aug 5, 2026

Copy link
Copy Markdown
Member

Benchmarks completed. Overview.

@SolalPirelli

Copy link
Copy Markdown
Contributor Author

kmeans has already shown bimodal behavior before. I'll look into what the optimizer does there but that can be a separate PR.

@SolalPirelli
SolalPirelli marked this pull request as ready for review August 5, 2026 14:35
@SolalPirelli
SolalPirelli requested a review from lrytz August 5, 2026 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants