diff options
author | jaimefrio <jaime.frio@gmail.com> | 2014-05-25 00:15:45 -0700 |
---|---|---|
committer | jaimefrio <jaime.frio@gmail.com> | 2014-05-25 21:33:13 -0700 |
commit | 494abcf189e9b53e42b624752eb3eaaf46a0dfd3 (patch) | |
tree | f82a3fe17196c0e93e245ca1079afdcae83d209b /numpy/core/bscript | |
parent | 4b42810fe45727dbd6ef0c70f8e766fee97db14e (diff) | |
download | numpy-494abcf189e9b53e42b624752eb3eaaf46a0dfd3.tar.gz |
ENH: speed-up minimum, maximum and xor for bool dtype
Replaced the operations for the above ufuncs on bools, by simpler
single instructions.
On random inputs `np.minimum` and `np.maximum` run about 25% faster,
and `np.logical_xor` and `np.bitwise_xor` almost 3x faster.
Diffstat (limited to 'numpy/core/bscript')
-rw-r--r-- | numpy/core/bscript | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/core/bscript b/numpy/core/bscript index 872d4d2ba..5230aa428 100644 --- a/numpy/core/bscript +++ b/numpy/core/bscript @@ -416,7 +416,7 @@ def pre_build(context): "lib", "npy-pkg-config", "mlib.ini")) inifile_npymath = context.local_node.declare(os.path.join( "lib", "npy-pkg-config", "npymath.ini")) - context.register_outputs("numpy_gen_inifiles", "numpyconfig", + context.register_outputs("numpy_gen_inifiles", "numpyconfig", [inifile_mlib, inifile_npymath]) context.register_category("numpy_gen_headers") @@ -506,6 +506,7 @@ def pre_build(context): name="ufunc_api") ufunc_templates = [ + "src/umath/loops.h.src", "src/umath/loops.c.src", "src/umath/funcs.inc.src", "src/umath/simd.inc.src"] @@ -518,6 +519,7 @@ def pre_build(context): includes = ["src/umath", "src/multiarray", "src/private"] if ENABLE_SEPARATE_COMPILATION: sources = [ + pjoin("src", "umath", "loops.h.src"), pjoin("src", "umath", "loops.c.src"), pjoin('src', 'umath', 'reduction.c'), pjoin('src', 'umath', 'ufunc_object.c'), |