perf(delta): O(n) cumulative sum instead of O(n w) per-element np.mean - #48
Merged
CodSpeed HQ / CodSpeed Performance Analysis
succeeded
Jul 30, 2026 in 0s
Performance Gate Passed
⚡ 4 improved benchmarks
✅ 24 untouched benchmarks
Performance Changes
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | test_detrend_method[delta-w100] |
17.6 ms | 3.5 ms | ×5.1 |
| ⚡ | test_detrend_method[delta-w10] |
17.4 ms | 3.5 ms | ×5 |
| ⚡ | test_detrend_method[z_score-p10] |
2.1 ms | 1.7 ms | +22.45% |
| ⚡ | test_ordinal_patterns |
15.9 ms | 13.4 ms | +18.17% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing perf/delta-convolution (6af1d81) with main (875adcd)
Loading