diff options
author | Julian Taylor <jtaylor.debian@googlemail.com> | 2013-08-09 19:30:53 +0200 |
---|---|---|
committer | Julian Taylor <jtaylor.debian@googlemail.com> | 2013-08-09 21:23:06 +0200 |
commit | e91acdb17b2a9c65a0fb9b7a97764aa375819784 (patch) | |
tree | 1d6d0981d1efdf0ca05b0ddd2f64352a6186d77d /numpy/core/setup_common.py | |
parent | 433f8968e4df729093ca627546a647a31fc2ed8c (diff) | |
download | numpy-e91acdb17b2a9c65a0fb9b7a97764aa375819784.tar.gz |
ENH: add NPY_LIKELY and NPY_UNLIKELY macros for branching hints
Use it for npy_is_aligned expecting alignments of the power of two.
Cuts down the time spent in _IsAligned by the testsuite relative
to the rest of multiarray.so from 0.6% to 0.4%
Diffstat (limited to 'numpy/core/setup_common.py')
-rw-r--r-- | numpy/core/setup_common.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/core/setup_common.py b/numpy/core/setup_common.py index 9f745e965..9a630225d 100644 --- a/numpy/core/setup_common.py +++ b/numpy/core/setup_common.py @@ -111,6 +111,7 @@ OPTIONAL_INTRINSICS = [("__builtin_isnan", '5.'), ("__builtin_isfinite", '5.'), ("__builtin_bswap32", '5u'), ("__builtin_bswap64", '5u'), + ("__builtin_expect", '5, 0'), ] # gcc function attributes |