The Wayback Machine - https://web.archive.org/web/20220303155817/https://github.com/JuliaLang/julia/pull/41794
Skip to content
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

compiler: speed up bootstrapping time by 25% #41794

Merged
merged 1 commit into from Aug 5, 2021
Merged

compiler: speed up bootstrapping time by 25% #41794

merged 1 commit into from Aug 5, 2021

Conversation

aviatesk
Copy link
Member

@aviatesk aviatesk commented Aug 5, 2021

The optimizer code is full of loop constructions and I found they're
really better to not run in interpreter.

With this PR, we create the caches of the optimizer code first and
it speeds up the succeeding bootstrapping to create the caches for
the overall inference code.

On my machine, the bootstrapping took about 80 seconds previously,
but on this PR the time is reduced to about 60 seconds.

The optimizer code is full of loop constructions and I found they're
really better to not run in interpreter.

With this PR, we create the caches of the optimizer code first and
it speeds up the succeeding bootstrapping to create the caches for
the overall inference code.

On my machine, the bootstrapping took about 80 seconds previously,
but on this PR the time is reduced to about 60 seconds.
@aviatesk aviatesk requested review from JeffBezanson and vtjnash Aug 5, 2021
@oscardssmith
Copy link
Member

@oscardssmith oscardssmith commented Aug 5, 2021

I don't fully understand this, but I'll gladly take 20 second faster CI!

vtjnash
vtjnash approved these changes Aug 5, 2021
@aviatesk aviatesk merged commit d18d8a4 into master Aug 5, 2021
21 of 22 checks passed
@aviatesk aviatesk deleted the avi/bootstrap branch Aug 5, 2021
@@ -5,10 +5,20 @@
# especially try to make sure any recursive and leaf functions have concrete signatures,
# since we won't be able to specialize & infer them at runtime

let fs = Any[typeinf_ext, typeinf, typeinf_edge, pure_eval_call, run_passes],
Copy link
Contributor

@jonas-schulze jonas-schulze Aug 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that besides reordering, pure_eval_call has been removed. How come that it isn't needed anymore?

Copy link
Member Author

@aviatesk aviatesk Aug 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pure_eval_call can be easily inferred from the entries like typeinf, because we make sure Core.Compiler is very type stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants