Skip to content

Fix atoms computation of OrType #16697

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

Merged
merged 1 commit into from
Jan 14, 2023
Merged

Fix atoms computation of OrType #16697

merged 1 commit into from
Jan 14, 2023

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jan 14, 2023

Previously, pos/i7034.scala took more than a minute to compile on my M1 MacBook Pro. Now it takes 5 seconds. The file consists of an IArray with over 4000 string literal elements. The previous caching logic was faulty, which means there was a lot of repeated computation of large immutable sets.

Previously, pos/i7034.scala took more than a minute to compile on my M1 MacBook Pro.
Now it takes 5 seconds. The file consists of an IArray with over 4000 string literal
elements. The previous caching logic was faulty, which means there was a lot of repeated
computation of large immutable sets.
Copy link
Member

@dwijnand dwijnand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No concerns from me. But how does the logic change? I'm clearly blind somehow..

@odersky
Copy link
Contributor Author

odersky commented Jan 14, 2023

If atomsRunId == ctx.runId it would return false, and then recompute. That means the cache was useless.

@odersky odersky merged commit b195113 into scala:main Jan 14, 2023
@odersky odersky deleted the fix-atoms branch January 14, 2023 15:07
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