summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorJulian Taylor <juliantaylor108@gmail.com>2019-05-12 18:35:18 +0200
committerJulian Taylor <juliantaylor108@gmail.com>2019-05-12 22:40:51 +0200
commit886da7998d0cdc115cd010671a904390a7275810 (patch)
tree90fe9cfb094deebd92c820e764749adda45b8eeb /benchmarks
parente6227a0326b503172fa9f95e0544a099ec85e05d (diff)
downloadnumpy-886da7998d0cdc115cd010671a904390a7275810.tar.gz
ENH: restore unpack bit lookup table
Restores the good performance of unpackbits we had since 1.13. Added a second lookup table for the new little bitorder flag and changed it to be stored in little endian as it is the more common endian.
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/benchmarks/bench_core.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/benchmarks/benchmarks/bench_core.py b/benchmarks/benchmarks/bench_core.py
index 194ce3218..9e409dd91 100644
--- a/benchmarks/benchmarks/bench_core.py
+++ b/benchmarks/benchmarks/bench_core.py
@@ -162,12 +162,18 @@ class UnpackBits(Benchmark):
def time_unpackbits(self):
np.unpackbits(self.d)
+ def time_unpackbits_little(self):
+ np.unpackbits(self.d, bitorder="little")
+
def time_unpackbits_axis0(self):
np.unpackbits(self.d2, axis=0)
def time_unpackbits_axis1(self):
np.unpackbits(self.d2, axis=1)
+ def time_unpackbits_axis1_little(self):
+ np.unpackbits(self.d2, bitorder="little", axis=1)
+
class Indices(Benchmark):
def time_indices(self):