summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorChunlin <fangchunlin@huawei.com>2020-06-01 14:17:57 +0800
committerGitHub <noreply@github.com>2020-06-01 09:17:57 +0300
commitbdd4e2e29c4b011cf455a72f85c92010656d2722 (patch)
tree79dbdfff31b8e3720d2aeeaba46174e74303d182 /benchmarks
parent1b212bda1c2833467177eb0d62c6de6c224c6a80 (diff)
downloadnumpy-bdd4e2e29c4b011cf455a72f85c92010656d2722.tar.gz
ENH: ARM Neon implementation with intrinsic for np.argmax. (#16375)
* Neon implementation with intrinsic for bool argmax
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/benchmarks/bench_reduce.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/benchmarks/benchmarks/bench_reduce.py b/benchmarks/benchmarks/bench_reduce.py
index 76c573a51..7b05f4fcc 100644
--- a/benchmarks/benchmarks/bench_reduce.py
+++ b/benchmarks/benchmarks/bench_reduce.py
@@ -58,6 +58,15 @@ class MinMax(Benchmark):
def time_max(self, dtype):
np.max(self.d)
+class ArgMax(Benchmark):
+ params = [np.float32, bool]
+ param_names = ['dtype']
+
+ def setup(self, dtype):
+ self.d = np.zeros(200000, dtype=dtype)
+
+ def time_argmax(self, dtype):
+ np.argmax(self.d)
class SmallReduction(Benchmark):
def setup(self):