Boost logo

Boost Users :

From: David Abrahams (dave_at_[hidden])
Date: 2007-10-12 14:40:01


on Thu Oct 11 2007, "Mike Marchywka" <marchywka-AT-hotmail.com> wrote:

>>No we do not. The compiler does not need to know the contents of f to
>>generate that code. Neither do we need to know the contents of f to
>>discuss the code that the compiler generates in this case. I
>>deliberately left f undefined so that loop efficiency can be studied in
>>isolation.
>
> If you don't write something the compiler could inline,I wouldn't
> worry about things that are on the order of a subroutine call.

Furthermore, if you do write something inlineable, the compiler may be
able to dispense with additional overhead from BOOST_FOREACH that
cannot be legally removed without knowing the full loop body.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com

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