Skip to content

Optimize MegaPhase #3393

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 3 commits into from
Nov 11, 2017
Merged

Optimize MegaPhase #3393

merged 3 commits into from
Nov 11, 2017

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Oct 26, 2017

#3366 did lose some performance relative to the previous tree transform scheme.

http://dotty-bench.epfl.ch/3366/

shows a loss of about 4% for scalapb and dotty. This PR is trying to get it back by reverting to a scheme close to the previous TreeTransform. We keep the new names, and shorten everything by about 20%, but otherwise rely on a similar dispatch algorithm as before.

@odersky
Copy link
Contributor Author

odersky commented Oct 26, 2017

test performance please

@dottybot
Copy link
Member

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

@dottybot
Copy link
Member

performance test failed:

Error line number: 19

[check /data/workspace/bench/logs/pull-3393-10-26-19.09.out for more information]

@odersky
Copy link
Contributor Author

odersky commented Oct 26, 2017

test performance please

@dottybot
Copy link
Member

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

@dottybot
Copy link
Member

performance test failed:

Error line number: 19

[check /data/workspace/bench/logs/pull-3393-10-26-19.25.out for more information]

@odersky
Copy link
Contributor Author

odersky commented Oct 26, 2017

How can I find out what failed?

@liufengyun
Copy link
Contributor

@odersky This is a regression of the bench infrastructure. I've reverted the changes on the server to the old code.

@liufengyun
Copy link
Contributor

test performance please

@dottybot
Copy link
Member

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

@dottybot
Copy link
Member

Performance test finished successfully:

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

Benchmarks is based on merging with master (26aba2b)

@liufengyun
Copy link
Contributor

The website is already pushed to github as usual, but seems gh-pages have some problem in publishing it:

https://github.com/liufengyun/bench/tree/gh-pages/3393

I plan to host the site on our own server instead.

@odersky
Copy link
Contributor Author

odersky commented Oct 26, 2017

test performance please

@dottybot
Copy link
Member

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

@dottybot
Copy link
Member

Performance test finished successfully:

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

Benchmarks is based on merging with master (26aba2b)

The new implementation is essentially a slightly cleaned-up version of the
old one from TreeTransformers, which seemed to performed better. The main difference (besides
renaming things) is that prepare operations still return contexts instead of TreeTransforms.
@odersky odersky force-pushed the optimize-megaphase-1 branch from 32b4e1c to a7c34ec Compare October 27, 2017 16:43
@odersky
Copy link
Contributor Author

odersky commented Oct 27, 2017

test performance please

@dottybot
Copy link
Member

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

@dottybot
Copy link
Member

Performance test finished successfully:

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

Benchmarks is based on merging with master (68cc7ee)

@odersky
Copy link
Contributor Author

odersky commented Oct 27, 2017

Tests are still a bit too noisy to be able to isolate effects of changes in detail but we are at all-time lows for compile times for Vector, scalapb and dotty, so I'd say it's a success overall.

@smarter
Copy link
Member

smarter commented Oct 27, 2017

Note that the removal of TreeTransform is likely to have a signficant impact on the benchmark here since you're compiling a thousand lines of code less. Is it possible that the original MegaPhase stuff is slower for dotty just because you were compiling more code?

@odersky
Copy link
Contributor Author

odersky commented Oct 29, 2017

@smarter Yes, removal of TreeTransform is surely a large part of the improvement of the dotty test. But we see smaller improvements for scalapb and Vector as well.

@odersky odersky merged commit c272732 into scala:master Nov 11, 2017
@allanrenucci allanrenucci deleted the optimize-megaphase-1 branch November 13, 2017 09:08
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.

4 participants