Sliding window optimizations