summaryrefslogtreecommitdiff
path: root/numpy/add_newdocs.py
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2013-07-11 20:23:36 +0200
committerJulian Taylor <jtaylor.debian@googlemail.com>2013-08-09 18:32:05 +0200
commit7819817653003fdae4554cbfab4cdbedf824c305 (patch)
tree4c3a662fe97f18265bf57b14fec78c25c5fd20a8 /numpy/add_newdocs.py
parent928289bf37081f4deb6755e226600998ccc23610 (diff)
downloadnumpy-7819817653003fdae4554cbfab4cdbedf824c305.tar.gz
ENH: improve numpy.all()/any()
Unroll the loop once and use pminub/pmaxub to save a slow pmovmskb instruction. Improves performance by 50% on some AMD chips. Also add a pure libc path using memcmp and memchr for non amd64 systems. The libc path can be faster with a very modern cpu and libc version, e.g. an i7 with glibc 2.17 is about 20% faster than our code but many other tested platforms are much slower (2.12 xeon, core2duo) or same speed (2.17 phenom). The numpy code can be removed in future when faster libc versions and cpus are more commonly available.
Diffstat (limited to 'numpy/add_newdocs.py')
0 files changed, 0 insertions, 0 deletions