Slight speedup of non-resizing filtering