-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
small compiler performance improvement
Inference calls eval() a lot to resolve module references, and this was inefficient since eval() assumes expressions might need to be expanded, so everything was going back through part of the front end. Fixed by calling the interpreter directly. Unfortunately this does not affect the system image build time much, only a couple of seconds. But these are worth it: time for `make testall` before: real 3m56.272s user 13m41.657s sys 0m4.517s after: real 3m6.434s user 10m52.977s sys 0m4.223s time for `using Gadfly` before: julia> tic(); using Gadfly; toc() elapsed time: 51.968993674 seconds after: julia> tic(); using Gadfly; toc() elapsed time: 48.591181748 seconds Would be great to find more low-hanging fruit like this.
- Loading branch information
1 parent
4f81ad9
commit 8973ed1
Showing
3 changed files
with
7 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8973ed1
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.
This is pretty great. Win32, serial, before, 28 minutes: https://ci.appveyor.com/project/tkelman/julia-nightly-packaging/build/1.0.31/job/vmkd8xss2o4969rl
after, 22 minutes: https://ci.appveyor.com/project/tkelman/julia-nightly-packaging/build/1.0.33
Too bad Win64 is still out of reach https://ci.appveyor.com/project/tkelman/julia-nightly-packaging/build/1.0.34/job/yceei85geyvmotaj
8973ed1
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 a handful of places in there, you could probably replace
eval
with a direct symbol lookup:getfield
. for example, inabstract_eval_global
8973ed1
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.
eval(module,symbol)
already has a fast path that avoids the front end.