-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Cache quote unpickling #12242
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
Cache quote unpickling #12242
Conversation
test performance with #quotes please |
performance test scheduled: 7 job(s) in queue, 1 running. |
In what situations will the same quote be unpickled multiple times? |
I will try different variants. The current is using the smallest cashing possible, the cache lives during the expansion of a single macro but skips some due to a bug. This is enough for a recursive macro to be optimized. Though I am not sure if this difference will be noticeable with the current benchmarks. The first step will be to create a benchmark where this difference can be noticed. Also see #12228. |
87aad4c
to
c0e7736
Compare
Performance test finished successfully: Visit https://dotty-bench2.epfl.ch/12242/ to see the changes. Benchmarks is based on merging with master (3d8b6a1) |
bae29e3
to
bd2fd57
Compare
test performance with #quotes please |
performance test scheduled: 1 job(s) in queue, 0 running. |
Performance test finished successfully: Visit https://dotty-bench2.epfl.ch/12242/ to see the changes. Benchmarks is based on merging with master (007dacd) |
test performance with #quotes please |
performance test scheduled: 1 job(s) in queue, 0 running. |
@nicolasstucki You may need to clear the cache to see the result. |
Performance test finished successfully: Visit https://dotty-bench2.epfl.ch/12242/ to see the changes. Benchmarks is based on merging with master (007dacd) |
I noticed |
bd2fd57
to
d6eed31
Compare
test performance with #quotes please |
performance test scheduled: 1 job(s) in queue, 0 running. |
test performance with #quotes please |
performance test scheduled: 2 job(s) in queue, 1 running. |
Performance test finished successfully: Visit https://dotty-bench2.epfl.ch/12242/ to see the changes. Benchmarks is based on merging with master (bb5e140) |
1 similar comment
Performance test finished successfully: Visit https://dotty-bench2.epfl.ch/12242/ to see the changes. Benchmarks is based on merging with master (bb5e140) |
test performance with #quotes please |
performance test scheduled: 1 job(s) in queue, 1 running. |
The per run cache did not seem to help much in https://github.com/lampepfl/dotty/blob/master/tests/bench/power-macro/PowerInlined-1k.scala even though we expand 8 macros |
test performance with #quotes please |
2 similar comments
test performance with #quotes please |
test performance with #quotes please |
performance test scheduled: 1 job(s) in queue, 1 running. |
test performance with #quotes please |
performance test scheduled: 3 job(s) in queue, 1 running. |
Performance test finished successfully: Visit https://dotty-bench2.epfl.ch/12242/ to see the changes. Benchmarks is based on merging with master (c14ec43) |
34bfc22
to
94f069e
Compare
test performance with #quotes please |
performance test scheduled: 8 job(s) in queue, 0 running. |
test performance with #quotes please |
performance test scheduled: 8 job(s) in queue, 0 running. |
test performance with #quotes please |
a394572
to
97d747a
Compare
test performance with #quotes please |
performance test scheduled: 8 job(s) in queue, 0 running. |
1 similar comment
performance test scheduled: 8 job(s) in queue, 0 running. |
Performance test finished successfully: Visit https://dotty-bench2.epfl.ch/12242/ to see the changes. Benchmarks is based on merging with master (b1a3e6d) |
97d747a
to
00115c6
Compare
test performance with #quotes please |
performance test scheduled: 1 job(s) in queue, 1 running. |
Performance test finished successfully: Visit https://dotty-bench2.epfl.ch/12242/ to see the changes. Benchmarks is based on merging with master (2d2038e) |
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.
LGTM
// Copy the cached tree to make sure the all definitions are unique. | ||
TreeTypeMap(oldOwners = List(owner), newOwners = List(owner)).apply(tree) | ||
case _ => | ||
tree |
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.
In case we have optimizations that make the TreeTypeMap
and identity function, do we have a test to guard against such optimizations?
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.
We already do that optimization outside TreeTypeMap
, for example in changeOwner
.
We do have tests that would fail if this stops cloning the symbols.
No description provided.