Boost logo

Boost :

Subject: Re: [boost] boost.foreach overhead
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2010-10-17 13:30:13


On 17/10/10 18:12, Christopher Lux wrote:
> On 10/9/2010 John Carmack of id Software wrote on his Twitter
> account: “@ID_AA_Carmack: It took 69 single steps to get past a
> BOOST_FOREACH() statement. Madness.”
>
> This made me think again about the overhead introduced with boost
> foreach. Is the overhead really this large as he makes it sound? Are
> there heuristics to when to use foreach according to the expected
> iteration counts?

I haven't counted exact number of steps, though it's unclear
to me what John means exactly.
Remembering some benchmarks on the list and assuming nothing has changed
in the macro that could decrease its performance,
I'd not be worried:

http://boost.2283326.n4.nabble.com/BOOST-FOREACH-slow-tp2652445p2652464.html

Best regards,

-- 
Mateusz Loskot, http://mateusz.loskot.net
Charter Member of OSGeo, http://osgeo.org
Member of ACCU, http://accu.org

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk