|
Boost Users : |
From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2003-11-11 18:10:11
"Jon Kalb" <Kalb_at_[hidden]> wrote in message
news:BBD692DA.26EF9%Kalb_at_LibertySoft.com...
> 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]]
[snip}
> the exact number, but he found that a function call using Boost::function
> generated about 20K of code (in our development environment). I realize
that
> 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>
[snip]
> ones. But every library has some overhead cost and has some applications
for
> 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
http://www.boost.org/doc/html/function.misc.html#id2886060, 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
an
> 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
make
> 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 hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net