summaryrefslogtreecommitdiff
path: root/numpy/polynomial/polyutils.py
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2013-09-28 16:19:56 +0200
committerJulian Taylor <jtaylor.debian@googlemail.com>2013-09-28 17:15:32 +0200
commit1475cfa46356c63c337b2d3d5903be2451dbb9c5 (patch)
treea53f3c4738ca930683cf287ea8fa727db9da8b68 /numpy/polynomial/polyutils.py
parent24df94cff2373b07d06990cdf6a2c804506c0a39 (diff)
downloadnumpy-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