PERF: improve perf of variable window rolling_min/max · Issue #19521 · pandas-dev/pandas (original) (raw)
The variable window implementation of rolling max/min
is O(n x w) rather than amortized O(n) with a deque
based algorithm
here is a possibility
we could easily use the cython c++ impl of deque. here is a suggestion to use a heap.