Boost logo

Boost Users :

From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2003-11-11 18:10:11

"Jon Kalb" <Kalb_at_[hidden]> wrote in message
> On 11/10/03 5:49 PM, "Darryl Green" <Darryl.Green_at_[hidden]> wrote:
> > Hi Jon,
> >
> >> -----Original Message-----
> >> From: Jon Kalb [mailto:Kalb_at_[hidden]]


> the exact number, but he found that a function call using Boost::function
> generated about 20K of code (in our development environment). I realize
> in a day when gigabyte hard drives are a dime a dozen it seems miserly to
> worry about 20K, but that is for *one function call*. I don't think he
> benchmarked it to see how long it takes to execute this code, but still I
> think he has a point when he talks about code bloat.

<Insert standard pre-mature (performance/size)optimizaton arguments here>


> ones. But every library has some overhead cost and has some applications
> which it is ill-suited. We need to evaluate each library on its own merits
> and never assume that because one was accepted in Boost it has some magic
> property that means there are no performance trade-offs or that the
> performance profiles of all Boost libraries are similar.

Which in this case Douglas Gregor has gone to great lengths to describe! See, whose link is
readily apparent in the Table of Contents. I have found that most boost
libraries adequately describe their limitations.

> Suppose users determine that Boost::function (I'm just picking on this as
> example) is great for creating flexible interfaces, but should be avoided
> for any inner-loop use or where code size is at a premium. That doesn't
> the library worthless, in fact, adding advice about the best situations to
> use the library enhances its value.
> --
> Jon Kalb
> Kalb_at_[hidden]

Jeff Flinn
Applied Dynamics, International

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at