PERF: Rolling/Expanding.cov/corr by mroeschke · Pull Request #39591 · pandas-dev/pandas (original) (raw)
Also I think I stumbled on some bugs along the way; added whatsnew and modified the existing tests where necessary.
$ asv_bench % asv continuous -f 1.1 upstream/master HEAD -b rolling.Pairwise.time_groupby
before after ratio
[f79468b8] [6a1e8592]
<master> <ref/groupby_rolling_pairwise>
- 299±50ms 178±20ms 0.59 rolling.Pairwise.time_groupby(1000, 'corr', True)
- 272±7ms 157±20ms 0.58 rolling.Pairwise.time_groupby(1000, 'cov', True)
- 262±1ms 146±4ms 0.56 rolling.Pairwise.time_groupby(None, 'cov', True)
- 303±10ms 158±6ms 0.52 rolling.Pairwise.time_groupby(10, 'cov', True)
- 279±20ms 139±0.7ms 0.50 rolling.Pairwise.time_groupby(None, 'corr', True)
- 315±10ms 149±10ms 0.47 rolling.Pairwise.time_groupby(10, 'corr', True)
- 137±2ms 34.0±0.8ms 0.25 rolling.Pairwise.time_groupby(10, 'cov', False)
- 127±5ms 28.2±1ms 0.22 rolling.Pairwise.time_groupby(None, 'cov', False)
- 134±5ms 28.1±0.4ms 0.21 rolling.Pairwise.time_groupby(1000, 'cov', False)
- 135±2ms 27.7±1ms 0.21 rolling.Pairwise.time_groupby(None, 'corr', False)
- 178±10ms 33.7±2ms 0.19 rolling.Pairwise.time_groupby(10, 'corr', False)
- 159±20ms 29.9±2ms 0.19 rolling.Pairwise.time_groupby(1000, 'corr', False)
SOME BENCHMARKS HAVE CHANGED SIGNIFICANTLY.
PERFORMANCE INCREASED.