PERF: Rolling._apply iterates over blocks _and_ columns #42736
Labels
Performance
Memory or execution speed performance
Refactor
Internal refactoring of code
Window
rolling, ewma, expanding
Milestone
@mroeschke looking at BaseWindow._apply we're spending a lot of time in apply_along_axis in our asvs (results posted below). IIUC whats happening is that homogeneous_func is passed to BlockManager.apply thereby iterating over Blocks, and then within that call it iterates over columns.
My intuition is that we should either iterate over blocks or columns but not both. Is there a reason to do both?
Not sure about UDFs, but for mean/sum/... it seems like we'd have to edit the cython functions to iterate over columns there, right?
The text was updated successfully, but these errors were encountered: