-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Time to run N tests grows faster than linear in N: codegen problem? #15346
Comments
OT, but I liked this so much I ran this on 0.4.1 versus BaseTestNext: |
@JeffBezanson: wild guess but could this have to do with the issue you were having with |
this appears to be partially related to #15262 (the non-linear behavior of the lowering pass is much stronger than for the rest of the passes) |
I suspect the |
Ah, if this happens with lots of comprehensions then it's probably something other than |
this might make tests a wee bit faster ref #15346
this might make tests a wee bit faster ref #15346
this might make tests a wee bit faster ref #15346
this might make tests a wee bit faster ref #15346
this might make tests a wee bit faster ref #15346
I was hoping that #16634 would fix this, but apparently not. |
when merging two frames (such as when handling exception frames), most of the time new is old, but the computation here is exponential in the number of variables so we want the inner computation here to be ultra-fast in the common case fix #15346
when merging two frames (such as when handling exception frames), most of the time new is old, but the computation here is exponential in the number of variables so we want the inner computation here to be ultra-fast in the common case fix #15346
How does this compare to 0.5? I.e. did this at least improve it somewhat? |
Thanks, @andreasnoack. Good to know where we stand on all three versions. Seems like backporting the frontend speedup PR to 0.5 might be a good idea, and that some more improvement here would be even better. |
when merging two frames (such as when handling exception frames), most of the time new is old, but the computation here is exponential in the number of variables so we want the inner computation here to be ultra-fast in the common case fix #15346
In my measurements, https://github.com/JuliaLang/julia/tree/jn/frontend-cl-closure-perf is another ~10x faster. Does that close the performance gap for you on this test case? |
Unfortunately, I don't see a difference relative to master. |
Maybe I'm looking at the wrong testcase. What one are you using? |
The one from the top post of this issue https://gist.github.com/anonymous/52b6599f6549c390b0e9. |
I am seeing a net 2x speedup:
|
I ran @IainNZ's updated version (in the same gist) except that I use |
Ah, OK. That one doesn't have any problem with lowering performance, but does have an issue with inference performance of code with branches. In that case, #19513 should give is a pretty good speedup. |
when merging two frames (such as when handling exception frames), most of the time new is old, but the computation here is exponential in the number of variables so we want the inner computation here to be ultra-fast in the common case fix JuliaLang#15346
On latest master, the time for N tests is still rather nonlinear in N. Gist with new version that writes out test times to a data file: |
Tried this now and running up to 1000 tests and things still look very linear (and much much faster than the original examples) |
The time to run N tests using
FactCheck
(which internally uses anonymous functions heavily) grows significantly faster than linear in N, causing long generated test suites to hang.This apparently is due to #13412 (tested with that commit compared to the previous one; thanks to @andreasnoack). It is approximately linear on 0.4.
I have written a simple file that generates test suites consisting of N tests of the form
@fact i-->i
:This gives the following run-times (in seconds!) on 0.5:
[This seems to be faster than power law and slower than exponential growth. Raw data here.]
The text was updated successfully, but these errors were encountered: