-
Notifications
You must be signed in to change notification settings - Fork 36
More optimizations and a fix for is_vararg_type
#254
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
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.
|
What is the |
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) |
These are all low-level optimizations. The cumulative effect is to go from ~18us/iteration in the
summer
benchmark 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
summer
benchmark, 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.