You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
For some odd reason, adding default values to keyword args to @njit-decorated functions results in 20x slowdowns in frequently used functions, like collect_peak_pairs. Further optimizations can bring this particular function to 40x speedup.
It shows that original collect_peak_pairs takes around
63.5 µs ± 1.06 µs per loop (mean ± std. dev. of 7 runs, 10,000 loops each)
While optimized takes around:
1.52 µs ± 26.9 ns per loop (mean ± std. dev. of 7 runs, 1,000,000 loops each)
What else?
Given that this function is the innermost segment in a double python for-loop, I don't know how much of a total runtime impact this will have - that outer loop has to be optimized too to take full advantage of this.
The text was updated successfully, but these errors were encountered:
Describe the bug
For some odd reason, adding default values to keyword args to
@njit
-decorated functions results in 20x slowdowns in frequently used functions, likecollect_peak_pairs
. Further optimizations can bring this particular function to 40x speedup.To Reproduce
Steps to reproduce the behavio:
It shows that original
collect_peak_pairs
takes aroundWhile optimized takes around:
What else?
Given that this function is the innermost segment in a double python for-loop, I don't know how much of a total runtime impact this will have - that outer loop has to be optimized too to take full advantage of this.
The text was updated successfully, but these errors were encountered: