-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Optimize megaphase #9597
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
Optimize megaphase #9597
Conversation
Avoid the closure creation. Downside: the function is no longer tail recursive. But this hopefully matters less, since lists of trees are rarely very long. If they do get longer to be dangerous for stack overflows we fall back to a more conservative implementation.
test performance please |
performance test scheduled: 11 job(s) in queue, 1 running. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/9597/ to see the changes. Benchmarks is based on merging with master (c5e1f0c) |
test performance please |
performance test scheduled: 8 job(s) in queue, 1 running. |
test performance please |
performance test scheduled: 8 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.
LGTM, let's see which recursive number is better.
BTW, we can run benchmarking for multiple commits like test performance please: dd9dbf4 0315e27
, which results in one point for each commit.
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/9597/ to see the changes. Benchmarks is based on merging with master (80d9dcc) |
It seems the lower number is dramatically better! So, deep stacks seem to be a performance bottleneck. I am going to test without the optimization altogether, to get another comparison. |
test performance please |
performance test scheduled: 11 job(s) in queue, 1 running. |
Performance test finished successfully: Visit http://dotty-bench.epfl.ch/9597/ to see the changes. Benchmarks is based on merging with master (188b99c) |
So recursing 1000 levels before going into the fall-back is clearly worse than doing nothing, but recursing 10 levels is clearly better. Reverting to that state. |
c504967
to
dd9dbf4
Compare
No description provided.