From 886da7998d0cdc115cd010671a904390a7275810 Mon Sep 17 00:00:00 2001 From: Julian Taylor Date: Sun, 12 May 2019 18:35:18 +0200 Subject: 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. --- benchmarks/benchmarks/bench_core.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'benchmarks') 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): -- cgit v1.2.1