-
Notifications
You must be signed in to change notification settings - Fork 34
Improve substitution performance by fixing type instabilities #2
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
Current coverage is 70.20% (diff: 100%)@@ master #2 diff @@
==========================================
Files 12 12
Lines 697 698 +1
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
- Hits 494 490 -4
- Misses 203 208 +5
Partials 0 0
|
| @@ -1,5 +1,5 @@ | |||
| function evalmap(vars, x::Vector, varorder::Vector{PolyVar}) | |||
| vals = Any[var for var in vars] | |||
| function evalmap{T}(vars, x::Vector{T}, varorder::Vector{PolyVar}) | |||
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.
Should we do a shortcut like:
if vars == varorder
x
else
... # current body of evalmap
end
?
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.
good idea; done
899b325 to
31d4262
Compare
1 similar comment
|
Okay, this has been rebased and cleaned up. |
|
Thanks a lot for looking into this ! |
|
No problem :). Optimizing julia code is surprisingly satisfying. |
This yields about a 10x improvement in substitution time on my simple benchmark (included in perf/runbenchmarks.jl).