-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Try to refine handling of SymDenotations V2 #4512
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
Conversation
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.
Hello, and thank you for opening this PR! 🎉
All contributors have signed the CLA, thank you! ❤️
Commit Messages
We want to keep history, but for that to actually be useful we have
some rules on how to format our commit messages (relevant xkcd).
Please stick to these guidelines for commit messages:
- Separate subject from body with a blank line
- When fixing an issue, start your commit message with
Fix #<ISSUE-NBR>:
- Limit the subject line to 72 characters
- Capitalize the subject line
- Do not end the subject line with a period
- Use the imperative mood in the subject line ("Add" instead of "Added")
- Wrap the body at 80 characters
- Use the body to explain what and why vs. how
adapted from https://chris.beams.io/posts/git-commit
Have an awesome day! ☀️
test performance please |
performance test scheduled: 3 job(s) in queue, 1 running. |
Current status: Symbol.denot calls reduced from 15.8M to 6.4M when compiling typers/*.scala |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/4512/ to see the changes. Benchmarks is based on merging with master (97f4155) |
test performance please |
The previous performance test have a 404. What could be the reason for this? |
performance test scheduled: 4 job(s) in queue, 1 running. |
This happens randomly sometimes, I don't know if @liufengyun knows the root cause, but the workaround is to add index.html at the end: http://dotty-bench.epfl.ch/4512/index.html |
@smarter Thanks for the tip! |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/4512/ to see the changes. Benchmarks is based on merging with master (2136fc1) |
Rebased to master |
test performance please |
performance test scheduled: 1 job(s) in queue, 1 running. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/4512/ to see the changes. Benchmarks is based on merging with master (83735d2) |
test performance please |
performance test scheduled: 1 job(s) in queue, 1 running. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/4512/ to see the changes. Benchmarks is based on merging with master (c38a6b7) |
test performance please |
performance test scheduled: 1 job(s) in queue, 1 running. |
performance test failed: Please check http://lamppc37.epfl.ch:8000/pull-4512-06-02-18.37.out for more information |
There is probably some merge breakage |
Everyone of these is a roundtrip `toDenot(stm).symbol`.
Managed to find two more violations at compile time.
This preserves the former behavior on NoDenotation.
... rather than the global ctx.uniqueNamedRefs hashtable. This reduces the size of the hashtable by a bit more than half
Reverted from commit 7587f9c This one seemed to cause a performance regression.
test performance please |
performance test scheduled: 1 job(s) in queue, 0 running. |
performance test failed: Please check http://lamppc37.epfl.ch:8000/pull-4512-06-08-09.19.out for more information |
The performance failure is fixed, the result is here: http://dotty-bench.epfl.ch/4512 |
So it seems there's a significant speedup for dotty itself (about 3% according to latest benchmark), and no speedups for the other tests. I'll run one more test, and then we can decide what to do with this. |
test performance please |
performance test scheduled: 1 job(s) in queue, 0 running. |
I see a non negligible slow down for scalap and re2. Isn't the speedup on Dotty artificial? My guess is that the speedup comes from the changes in the Dotty code base and not from a faster compiler . By adding all the cached SymDenotation facades to |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/4512/ to see the changes. Benchmarks is based on merging with master (df3c9b5) |
No clear win, except for dotty. Let's cherry-pick any improvements that make sense. |
It seems we get many cache misses when going from Symbols to their denotations. This is a very common operation: When compiling typer/*.scala, we generate ~80K symbols, ~125K SymDenotations, yet dereference .denot more than 15.8M times. Of these, 11.7M go to the symbol's initial denotation.
After closing #4504, this PR tries something else: Cache the hottests fields of denotations
in symbols, so that we can get at them without a dereference.
We don't need to introduce forwarders in Symbols to do this (although it might be a good idea for other reasons), and we don't need to have Symbol inherit from SymDenotation (which has proven to be a bad idea).