More optimizations and a fix for is_vararg_type#254
Merged
Conversation
It's not entirely clear why this was being (unnecessarily?) specialized, but this prevents it from happening.
Codecov Report
@@ Coverage Diff @@
## master #254 +/- ##
=========================================
- Coverage 87.15% 85.45% -1.7%
=========================================
Files 14 14
Lines 1985 2049 +64
=========================================
+ Hits 1730 1751 +21
- Misses 255 298 +43
Continue to review full report at Codecov.
|
Member
|
What is the |
Member
Author
|
Sorry, it's just JuliaInterpreter.jl/test/interpret.jl Lines 8 to 14 in cef5350 Float64 array of large enough size (e.g., 10^5) that initialization isn't a big deal. I usually do
frame = JuliaInterpreter.enter_call(summer, A)
@elapsed(JuliaInterpreter.finish_and_return!(frame))/length(A) |
KristofferC
approved these changes
Mar 31, 2019
timholy
added a commit
that referenced
this pull request
Apr 2, 2019
Merged
timholy
added a commit
that referenced
this pull request
Apr 2, 2019
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These are all low-level optimizations. The cumulative effect is to go from ~18us/iteration in the
summerbenchmark to ~16us/iteration. One of the commits, theis_vararg_type, actually leads to a 3% hit on that benchmark, but it fixes what seems to be an outright mistake. (Before 22a8b2c it was not possible to step into any function that receivedUnion{}as an argument; the case that I observed was forpromote_result.)On the
summerbenchmark, it seems the only remaining case of dynamic dispatch arises from JuliaLang/julia#31565.While performance improvements are always nice, my real goal in doing this is to prepare the way for a trial of the effect of lowered-code inlining (ref. #204 (comment)). Since I am hoping it has a dramatic effect, it would be a shame if it were "spoiled" by pre-existing bottlenecks, so I thought I'd start by getting rid of them even though currently they aren't terribly important.
To develop inlining, I think the best approach would be to first take a simple case, like
summer, and "inline by hand" to see if it provides as much improvement as I hope. If so, then it will be worth building out the more general machinery.