|
Boost : |
Subject: Re: [boost] [accumulator][minmax_element] Perfomance comparsion different min max algorithm
From: Hansi (hansipet_at_[hidden])
Date: 2009-02-17 05:20:22
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...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk