summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Taylor <juliantaylor108@gmail.com>2018-09-14 21:38:19 +0200
committerJulian Taylor <juliantaylor108@gmail.com>2018-09-20 18:11:18 +0200
commitc6b418fc5bbdeb9c34c3939ee41bf3cd36445c69 (patch)
treeafae7e3559e6a37d239a4ef5b2723067347aa5a8
parentde4893119139aad52b181324d1c9ce4862b1abc1 (diff)
downloadnumpy-c6b418fc5bbdeb9c34c3939ee41bf3cd36445c69.tar.gz
BENCH: add out of place memcpy benchmark
-rw-r--r--benchmarks/benchmarks/bench_io.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/benchmarks/benchmarks/bench_io.py b/benchmarks/benchmarks/bench_io.py
index ce30c4345..879f9b69e 100644
--- a/benchmarks/benchmarks/bench_io.py
+++ b/benchmarks/benchmarks/bench_io.py
@@ -21,6 +21,10 @@ class Copy(Benchmark):
def time_memcpy(self, typename):
self.d[...] = self.e_d
+ def time_memcpy_large_out_of_place(self, typename):
+ l = np.ones(1024**2, dtype=np.dtype(typename))
+ l.copy()
+
def time_cont_assign(self, typename):
self.d[...] = 1