The only untouched methods are the ones related to morphology. Everything else is much faster.
I can't get pad to be faster then NumPy's. I'm 95% convinced that it's impossible with ndarray 0.15.x. Just copying the input into the padded center region takes longer than the complete job in NumPy.
Even so, pad is a lot faster than it was. Depending in the mode, I'm 50%-400% faster.
Correlate is also faster. It was automatically optimized by pad and I made one loop faster and I used unsafe in the other loops. I think we're around 25% faster. And we're faster than SciPy for some inputs and args.
See #4. This MR doesn't fix the issue but we're much better now!
The only untouched methods are the ones related to morphology. Everything else is much faster.
pad
to be faster then NumPy's. I'm 95% convinced that it's impossible with ndarray 0.15.x. Just copying the input into the padded center region takes longer than the complete job in NumPy.pad
is a lot faster than it was. Depending in themode
, I'm 50%-400% faster.pad
and I made one loop faster and I usedunsafe
in the other loops. I think we're around 25% faster. And we're faster than SciPy for some inputs and args.See #4. This MR doesn't fix the issue but we're much better now!