-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
[MRG] FIX performance issue in _graph_connected_component #6268
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
[MRG] FIX performance issue in _graph_connected_component #6268
Conversation
|
fc3211b
to
2530aef
Compare
Note: 0.17 did not have such a strong perf issue, so no need to backport. |
2530aef
to
bd9ca75
Compare
Travis has revealed that this code can be much worse than before with recent python / numpy / scipy:
although I don't reproduce this behavior on my local workstation which is very similar... More work needed. @AlexandreAbraham maybe we should revert to the code of 0.17? |
2f7a881
to
bc46718
Compare
I changed the scipy version and it's still very slow on travis:
instead of 0.8s on my box with the same scipy version. |
instead of 0.8s on my box with the same scipy version.
Lack of good linear algebra library?
G
|
The slow configuration the one is using MKL :) Let me try to replicate locally to see if MKL is the culprit. This is quite unlikely though at this is mostly about walking a graph with |
Those tests run in 0.4ms with MKL on my box (same python / numpy / scipy versions from anaconda as on travis). This is really weird. |
Scipy might be the culprit – I seem to remember some recent changes to how scipy.sparse does row access. |
I have the same version of scipy on my local machine (0.16.1) and I don't have the problem. |
bc46718
to
19024a8
Compare
Rebased on top of current master to see if the number of threads of MKL or OpenBLAS is related to this issue. |
Ok the number of threads of MKL / OpenBLAS was the source of the problem. This is much faster now. Merging. |
…-condition [WIP] FIX performance issue in _graph_connected_component
This is a reworked version of the fix in #5713 with a new test.