Boost logo

Boost Users :

From: Erik (sigra_at_[hidden])
Date: 2007-10-11 11:50:22


Andrew Holden skrev:
> Erik wrote:
>
>> Unfortunately it does not look so good for BOOST_FOREACH
>> after this modification. It will increase to 24 instructions,
>> while the handcoded is still only 21. I created a script
>> (attached) to test the examples systematically with different
>> compiler versions and optimization levels.
>>
> Forgive me if this was answered in an earlier post,
The answer is available by executing the test script in my previous post
and then running the diff command that I showed in that post:
diff -dU2 iterate_vector-member-g++-4.2.0-O3.s
BOOST_FOREACH-member-g++-4.2.0-O3.s|kompare -

> but how complex is the loop body, including the complexity of any functions it calls?
The size of the loop body increases from 6 to 7 instructions and the
code before the loop increases with 2 instructions.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net