This library provides a means to track the rolling maximum and minium of a stream of numbers (or anything IComparable) in O(1) time.
This has been benchmarked to be faster than the ascending minima algorithm.
Available on NuGet as package RollingWindow
.