Skip to content

Cache more implicit scopes #9747

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
Sep 8, 2020
Merged

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Sep 7, 2020

Also cache implicit scopes that arise from types that map to a different
lifted type.

@odersky
Copy link
Contributor Author

odersky commented Sep 7, 2020

test performance please

@dottybot
Copy link
Member

dottybot commented Sep 7, 2020

performance test scheduled: 2 job(s) in queue, 1 running.

@dottybot
Copy link
Member

dottybot commented Sep 7, 2020

Performance test finished successfully:

Visit http://dotty-bench.epfl.ch/9747/ to see the changes.

Benchmarks is based on merging with master (101e620)

Also cache implicit scopes that arise from types that map to a different
lifted type.
@odersky
Copy link
Contributor Author

odersky commented Sep 8, 2020

Shows an improvement of 5% for Dotty. I don't think the other full compilation benchmarks use implicits much, so I would not expect them to be much affected.

Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

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

It's impressive, LGTM 👍

if (tp.hash == NotCached) computeEligible(tp)
if (tp.hash == NotCached)
Stats.record(i"compute eligible not cached ${tp.getClass}")
Stats.record(i"compute eligible not cached")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Stats.record(i"compute eligible not cached")

@odersky odersky merged commit 9f80d16 into scala:master Sep 8, 2020
@odersky odersky deleted the cache-iscopes branch September 8, 2020 11:38
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