Faster cube rolling window operations

41 views
Skip to first unread message

Stephan Hoyer

unread,
Jan 10, 2014, 8:46:31 PM1/10/14
to scitoo...@googlegroups.com
I recently wrote some code to do Iris rolling window operations using the Bottleneck package (https://github.com/kwgoodman/bottleneck) instead of Iris's built-in rolling window functionality. I've found it speeds up typical rolling window operations by a factor of about 5-10x, and the operations also use much less memory.

The code (including a unit test) is available at:
If there is interest, I would be happy to move this into Iris proper, although it would introduce another (optional) dependency.

Cheers,
Stephan

marqh

unread,
Jan 13, 2014, 11:54:29 AM1/13/14
to scitoo...@googlegroups.com
Hello Stephan

this sounds interesting.

I wouldn't worry much about the bottleneck dependency, there is already use of bottleneck as part of the use of pandas.

Tests can be put in which skip if dependencies are not present, see
https://github.com/SciTools/iris/blob/master/lib/iris/tests/test_pandas.py
for examples.

If there's less memory footprint and an operational speed up then it sounds valuable to me.  I'd be interested in seeing this as a pull request, perhaps with a note (not part of the proposed change) showing some performance comparisons which can be run so people can see the implications and how they may scale.

all the best
mark
Reply all
Reply to author
Forward
0 new messages