Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple performance improvement for Denotations #21584

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

noti0na1
Copy link
Member

@noti0na1 noti0na1 commented Sep 13, 2024

A simple performance improvement extracted from #21278

This PR:

  • caches signature in SingleDenotation for matchDegree;
  • reduces denot calls in widens.

This is a simpler approach which can reduce the compilation time of #20217 from 60s to about 20s 40s.

I revert the signature cache to keep this PR simple, because I don't understand why it works.

@dwijnand dwijnand changed the title Simple performance improvement for Denoations Simple performance improvement for Denotations Sep 13, 2024
@noti0na1
Copy link
Member Author

Probably the question is why we don't cache signatures for provisional MethodOrPoly.

I add an assertion, but the signature never change even if the type is provisional.

@noti0na1 noti0na1 merged commit be10596 into scala:main Sep 18, 2024
28 checks passed
@noti0na1 noti0na1 deleted the improve-denot branch September 18, 2024 20:45
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.

2 participants