-
Notifications
You must be signed in to change notification settings - Fork 56
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
Faster hermite #280
Faster hermite #280
Conversation
@ziofil --- Could you update the CHANGELOG? Also is this giving a speed increase? If so it would be nice to report it. |
Do you have a preferred speed test to compare it against? |
You could run the basic calculation that we use to test the correctness of the numba hermite vs the C++ hermites? |
Sure, where do I find it? |
In the |
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.
Awesome addition @ziofil . Really nice to see numba defeat C++ :)
def _grad_hermite_multidimensional_numba(R, y, array, dG_dR, dG_dy, cutoffs): | ||
indices = np.ndindex(cutoffs) | ||
next(indices) # skip the first index (0,...,0) |
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.
can you add a docstring here?
def _hermite_multidimensional_numba(R, array, y, cutoffs): | ||
indices = np.ndindex(cutoffs) |
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.
same here, a docstring would be nice
Codecov Report
@@ Coverage Diff @@
## master #280 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 21 21
Lines 1441 1428 -13
=========================================
- Hits 1441 1428 -13
Continue to review full report at Codecov.
|
🤯 How is Numba able to do this? |
probably the C++ code is not well written 😅 |
fully numbified filling of termite multitimensional arrays and gradients. It turns out
np.ndindex
is supported in numba.