|
Boost : |
Subject: Re: [boost] BOOST_FOREACH slow?
From: Hansi (hansipet_at_[hidden])
Date: 2008-11-18 01:59:53
regarding to the benchmark link posted from Michael Marcin BOOST_FOREACH
is 3 times slower then other equivalents...it is a lot...
Best regards
Hansjörg
Eric Niebler schrieb:
> Mathias Gaunard wrote:
>> Eric Niebler wrote:
>>
>>> During FOEACH's review, extensive performance tests showed FOREACH
>>> was only about 5% slower than the hand-coded equivalent on average.
>>
>> Why not make FOREACH as fast as hand-coded equivalents when it is
>> possible?
>> With decltype, typeof, or the MSVC hack it shouldn't be a problem.
>> Also some compilers have native support for foreach-like loops.
>
> I haven't spent a lot of time thinking about it, but I imagine making
> this transparent to users would be hard. BOOST_FOREACH has documented
> customization points that any alternate implementation should respect.
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk