-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
PRF: Speed up point_in_path and friends #6450
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
Since we now know the performance is so bad, this should discourage its use and flag it as something special. Also, use () in more places
Thanks to @tacaswell and @QuLogic for the legwork on this one! |
subtrans(1, 1), | ||
subtrans(0, 2), | ||
subtrans(1, 2)); | ||
int it = i % Ntransforms; |
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.
here you are using int
's, but elsewhere, you use size_t
. Any particular reason for that?
I am also perplexed about the performance issues with bool vs. uint8_t. Perhaps we should mention it to the numpy folks to see if they have any insights? That is the only change that has me a bit uneasy. Other than that, this looks good to me. |
If I recall correctly stl special cases bool and implements it as a As this is stl I do not think numpy would have any input (as I thought they Tom On Thu, May 19, 2016 at 9:30 AM Benjamin Root notifications@github.com
|
@tacaswell I remembered something similar to you about Notes from there:
So, going back to |
This is an alternative to #6446. Fix #6444.
point_in_path_impl
which avoids Python ref/deref and is therefore much fasteroperator[]
to subarray (which is still useful in some places where speed is less critical) and moves to using (, ,) elsewhere in the codebase where it makes sense.bool
for the results inpoint_in_path_impl
, which strangely was a lot slower