-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Improve performance of ErasedDecls phase #4145
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
Improve performance of ErasedDecls phase #4145
Conversation
test performance please |
performance test scheduled: 2 job(s) in queue, 1 running. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confident enough the change's a refactoring for approval (assuming method names aren't too misleading) — feel free to search more qualified reviewers 😉
else tp.derivedClassInfo(decls = tp.decls.filteredScope(!_.is(Erased))) | ||
case _ => tp | ||
override def transformInfo(tp: Type, sym: Symbol)(implicit ctx: Context): Type = { | ||
if (sym.is(JavaDefined) || sym.is(Scala2x)) tp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use InfoTransformer#mayChange instead, it's more efficient because it avoids having to force the info of the symbol: https://github.com/lampepfl/dotty/blob/2b342722681bf49780e575189356b0013f4dbfe6/compiler/src/dotty/tools/dotc/core/DenotTransformers.scala#L55-L59
b5be6c3
to
118bbe0
Compare
performance test scheduled: 2 job(s) in queue, 1 running. |
118bbe0
to
69a98aa
Compare
test performance please |
performance test scheduled: 2 job(s) in queue, 1 running. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/4145/ to see the changes. Benchmarks is based on merging with master (e5ff11c) |
test performance please |
performance test scheduled: 2 job(s) in queue, 1 running. |
test performance please |
performance test scheduled: 2 job(s) in queue, 1 running. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/4145/ to see the changes. Benchmarks is based on merging with master (e5ff11c) |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/4145/ to see the changes. Benchmarks is based on merging with master (911e388) |
No description provided.