Use ReverseListIterator instead of Stream API to reduce overhead. ListIterator provides means to iterate backwards so we're wrapping the existing iterator.
See #2857.
Original pull request: #2858.
@ -161,4 +162,28 @@ public class WindowIterator<T> implements Iterator<T> {
@@ -161,4 +162,28 @@ public class WindowIterator<T> implements Iterator<T> {