-
Notifications
You must be signed in to change notification settings - Fork 21
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
Profiling _bincount
and attempted acceleration with numba
#63
Comments
Thanks for doing this Tom! My impression is that most of the heavy lifting is done by np.digitize, which is already an accelerated function, there is not much room for speedup with numba. |
This is great @TomNicholas, thanks. I'm curious about your
|
As Ryan said, However, I think there is a significant optimization we could lift from
This is probably true. Instead, I think the main benefit we could get from Numba would be a more readable |
I tried profiling the core
_bincount
function, and then accelerating it with numba, a naive application of which only made it about 30% faster overall. Notebook here (and gist here in case the notebook cache hasn't updated yet).However I've never used numba before, and not done much profiling in python, so maybe there is something else I should have tried.
I also profilied to see if the
block_size
argument has much effect.Also I noticed that #49 introduced a regression where the
block_size
argument is no-longer passed down to_bincount
, so doesn't actually do anything. Fixed in #62.@rabernat @gjoseph92 @jrbourbeau
The text was updated successfully, but these errors were encountered: