
17 Feb
2009
17 Feb
'09
10:20 a.m.
Dmitry Goncharov schrieb:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< min_element,max_element:73 minVal=0,maxVal=9999999 min_max: accumulator:2338 minVal=0,maxVal=9999999 min_max: minmax_element:86 minVal=0,maxVal=9999999 min/max handcoded:135 minVal=0,maxVal=9999999 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
For me the strange things are: - that std::min_element and std::max_element is faster as boost::minmax_element ...
Why does this surprise you? std::min() (or std::max) should be faster that boost::minmax(). boost::minmax() should be faster than subsequent invocation of std::min() and then std::max().
minmax_element is slower as 2 subsequent calls of min_element,max_element. This is suprising...