summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2019-05-26 14:31:50 +0300
committerGitHub <noreply@github.com>2019-05-26 14:31:50 +0300
commit95aacf55b13c9f51d8ea5b7f1ed18c4ae73ff4af (patch)
treed2d2c50ad9cb1667a65589fa3b4fef68cbca14d5 /benchmarks
parent9839f301d21c7dc6e9c64ca635e702c0943367f2 (diff)
parent71fc59d587016d6f36007ba06e074d4d4a6b483d (diff)
downloadnumpy-95aacf55b13c9f51d8ea5b7f1ed18c4ae73ff4af.tar.gz
Merge pull request #13399 from superbobry/np.array-list-of-array-like
ENH: Improved performance of PyArray_FromAny for sequences of array-like
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/benchmarks/bench_core.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/benchmarks/benchmarks/bench_core.py b/benchmarks/benchmarks/bench_core.py
index 9e409dd91..f7ce61b8f 100644
--- a/benchmarks/benchmarks/bench_core.py
+++ b/benchmarks/benchmarks/bench_core.py
@@ -10,6 +10,7 @@ class Core(Benchmark):
self.l100 = range(100)
self.l50 = range(50)
self.l = [np.arange(1000), np.arange(1000)]
+ self.l_view = [memoryview(a) for a in self.l]
self.l10x10 = np.ones((10, 10))
def time_array_1(self):
@@ -27,6 +28,9 @@ class Core(Benchmark):
def time_array_l(self):
np.array(self.l)
+ def time_array_l_view(self):
+ np.array(self.l_view)
+
def time_vstack_l(self):
np.vstack(self.l)