diff options
author | Julian Taylor <jtaylor.debian@googlemail.com> | 2013-09-28 16:19:56 +0200 |
---|---|---|
committer | Julian Taylor <jtaylor.debian@googlemail.com> | 2013-09-28 17:15:32 +0200 |
commit | 1475cfa46356c63c337b2d3d5903be2451dbb9c5 (patch) | |
tree | a53f3c4738ca930683cf287ea8fa727db9da8b68 /numpy/polynomial/polyutils.py | |
parent | 24df94cff2373b07d06990cdf6a2c804506c0a39 (diff) | |
download | numpy-1475cfa46356c63c337b2d3d5903be2451dbb9c5.tar.gz |
ENH: speed up intp multiply overflow check
Avoid expensive division by checking against half size of the result first.
Speeds up PyArray_NewFromDescr by a factor of two according to perf.
Could still be further improved by making use of cpu overflow flags, e.g. via
clangs __builtin_mul_with_overflow or using gccs __int128 type.
Diffstat (limited to 'numpy/polynomial/polyutils.py')
0 files changed, 0 insertions, 0 deletions