-
-
Notifications
You must be signed in to change notification settings - Fork 26k
COSMIT Avoid writing out vectorizable operations in sparsefuncs_fast #10615
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
I think 1 review is fine for this if it gets a green tick. |
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.
I don't understand how yet, but apparently there are test failures due to numerical instability :(
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.
No, due to missed parentheses, not numerical instability.
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.
This one should be trivial to review
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.
Actually I'm wondering: is writing a for loop in cython for a sum of two numpy arrays is strictly equivalent from the performance perspective to adding them via the numpy API?
Numpy may have a little more overhead in checking inputs, but is often more efficient in the calculation of vectorised operations. |
Right, due to BLAS I imagine.
LGTM, merging. Thanks @jnothman ! |
Someone got a bit cython crazy.