News for hackers. Stuff that matters.
Re:How We Beat C++ STL Binary Search by rawnlq on Tuesday August 11, 2015 @07:28PM (#10045073)
Is there any technical reason why the STL implementation can't include optimized specializations when there are less generic operators it can use?
Re:How We Beat C++ STL Binary Search by thechao on Tuesday August 11, 2015 @09:39PM (#10045539)
No technical reason; just lack of effort! In fact, a well-optimized implementation of the STL should have a large number of machine-word specific optimizations (a la std::vector<bool>). However, none that I know of, do, other than light unrolling to promote vectorization. About the closest you can find is well-optimized versions of valarray.
Re:How We Beat C++ STL Binary Search by twoodfin on Tuesday August 11, 2015 @09:32PM (#10045517)
It does. That's what std::advance is. For a random access iterator it will use operator+.