Both algorithms were introduced by David Musser in , with the purpose of providing generic algorithms for the C++ Standard Library that have both fast average performance and optimal worst-case performance, thus allowing the performance requirements to be tightened.
David Musser presented two algorithms in  that cater to the need for efficient and reliable performance in the C++ Standard Library, achieving a balance between average speed and exceptional worst-case handling, thus supporting more rigorous performance expectations.