Avatar for the pydata user
pydata
sparse
BlogDocsChangelog

perf: short-circuit COO.reshape when -1 resolves to self.shape

#935Merged
Comparing
thodson-usgs:perf/reshape-resolve-neg1-before-shortcircuit
(
487809e
) with
main
(
f65a764
)
CodSpeed Performance Gauge
-18%
Improvement
20
Regression
2
Untouched
318

Benchmarks

340 total
test_index_slice[side=100-rank=2-format='gcxs']
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
-18%
2.2 ms2.7 ms
test_index_fancy[side=100-rank=1-format='coo']
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
-17%
1.2 ms1.4 ms
test_matmul[m=200-n=200-p=200-format='coo']
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
+24%
2.3 ms1.9 ms
test_matmul[m=200-n=1000-p=200-format='coo']
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
+23%
3.7 ms3 ms
test_matmul[m=200-n=500-p=200-format='coo']
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
+23%
2.8 ms2.3 ms
test_matmul[m=500-n=200-p=200-format='coo']
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
+21%
2.8 ms2.3 ms
test_matmul[m=1000-n=200-p=200-format='coo']
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
+19%
3.6 ms3 ms
test_matmul[m=500-n=500-p=200-format='coo']
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
+19%
4 ms3.3 ms
test_matmul[m=200-n=200-p=500-format='coo']
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
+18%
3.2 ms2.7 ms
test_matmul[m=500-n=1000-p=200-format='coo']
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
+18%
5.9 ms5 ms
test_matmul[m=200-n=500-p=500-format='coo']
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
+18%
4.4 ms3.7 ms
test_matmul[m=200-n=1000-p=500-format='coo']
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
+17%
6.3 ms5.4 ms
test_matmul[m=1000-n=500-p=200-format='coo']
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
+17%
5.8 ms5 ms
test_matmul[m=1000-n=1000-p=200-format='coo']
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
+15%
9.6 ms8.3 ms
test_gcxs_dot_ndarray[coo-m=200-n=200-p=200]
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
+15%
1.8 ms1.6 ms
test_matmul[m=200-n=200-p=1000-format='coo']
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
+15%
4.4 ms3.8 ms
test_matmul[m=200-n=500-p=1000-format='coo']
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
+14%
6.7 ms5.9 ms
test_matmul[m=200-n=1000-p=1000-format='coo']
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
+13%
10.4 ms9.2 ms
test_matmul[m=500-n=200-p=500-format='coo']
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
+13%
4.9 ms4.4 ms
test_gcxs_dot_ndarray[coo-m=200-n=500-p=200]
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
+11%
2.4 ms2.2 ms
test_matmul[m=500-n=500-p=500-format='coo']
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
+11%
7.5 ms6.8 ms
test_gcxs_dot_ndarray[coo-m=500-n=200-p=200]
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
+11%
2.5 ms2.2 ms
test_matmul[m=500-n=1000-p=500-format='coo']
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
+10%
11.9 ms10.8 ms
test_gcxs_dot_ndarray[coo-m=200-n=200-p=500]
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
+9%
2.9 ms2.7 ms
test_matmul[m=500-n=200-p=1000-format='coo']
benchmarks/test_benchmark_coo.py
CodSpeed Performance Gauge
+9%
7.7 ms7.1 ms

Commits

Click on a commit to change the comparison range
Base
main
f65a764
-20.64%
perf: short-circuit COO.reshape when -1 resolves to self.shape
71bbf2d
2 days ago
by thodson-usgs
+2.6%
perf: use `-1 in shape` for presence check in COO.reshape
487809e
2 days ago
by thodson-usgs
© 2026 CodSpeed Technology
Home Terms Privacy Docs