|Version 7 (modified by sasha, 7 years ago)|
Areas of NumPy that have come up as possible slow points:
- PyArray?_EnsureArray. It seems to be slow for python ints. This came up as a possible culprit for some pow() slowness. PyArray?_EnsureArray could special-check Python scalars for a speed-up.
- Default (digits=0) case of around is 10x slower than (x+0.5).astype(int).astype(float). Resolved: changeset:2151 implements fast rint function and adds a round method to ndarray that is about as fast for digits=0 case.
- As of changeset:2173 x.fill(1) is 2x slower than x += 1. One should be able to set memory to a constant value faster than autoincrement. Discussion.