summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorLars Grueter <lagru@mailbox.org>2018-11-23 16:46:54 +0100
committerLars Grueter <lagru@mailbox.org>2018-12-15 14:38:06 +0100
commit65a099d4f66c82b48372790d91b7738233043e68 (patch)
treeed465dfdbe94a72dba36a29fccf04e2d8a0cab1a /benchmarks
parentba008f405a89d07e170d1b4c893246fb25ccba04 (diff)
downloadnumpy-65a099d4f66c82b48372790d91b7738233043e68.tar.gz
BENCH: Pin dtype to float64 for np.pad's benchmarks
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/benchmarks/bench_lib.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/benchmarks/benchmarks/bench_lib.py b/benchmarks/benchmarks/bench_lib.py
index 05d6a4aae..211055c4c 100644
--- a/benchmarks/benchmarks/bench_lib.py
+++ b/benchmarks/benchmarks/bench_lib.py
@@ -16,8 +16,8 @@ class Pad(Benchmark):
[(1000,),
(10, 100),
(10, 10, 10),
- # 50 * 512 * 512 = 13 million points = 46 MB. should be a good
- # out of cache describing a typical usecase
+ # 50 * 512 * 512 * 64 bits = 100 MiB, corresponds to typical use cases
+ # for large arrays which are out of cache
(50, 512, 512)],
[1,
3,
@@ -34,7 +34,7 @@ class Pad(Benchmark):
def setup(self, shape, pad_width, mode):
# Make sure to fill the array to make the OS page fault
# in the setup phase and not the timed phase
- self.array = np.full(shape, fill_value=1)
+ self.array = np.full(shape, fill_value=1, dtype=np.float64)
def time_pad(self, shape, pad_width, mode):
np.pad(self.array, pad_width, mode)