Window memoization: toward high-performance image processing software