Boost logo

Boost :

Subject: Re: [boost] [function] function wrapping with no exceptionsafetyguarantee
From: Nevin Liber (nevin_at_[hidden])
Date: 2010-10-29 16:45:46

On 29 October 2010 15:02, Daniel Walker <daniel.j.walker_at_[hidden]> wrote:
> Result (Debug): Defining BOOST_FUNCTION_USE_STATIC_EMPTY yields a 18%
> decrease in time overhead per call but doubles the space overhead per
> type.

Does it? Presumably in the non-static-empty case the NULL pointer
check and throw are getting inlined, resulting in more code space
overhead the more times a given type is reused (which is typical, at
least in my experience)? Projects low on static space tend to be low
on code space as well. One would expect the code savings overhead to
be amortized fairly quickly.

> So, I think the current boost::function implementation is certainly
> the right default, since many users would not appreciate doubling the
> static space overhead for a time savings of less than 10% per call.

Is it? Projects low on static space usually don't have cycles to burn, either.

 Nevin ":-)" Liber  <mailto:nevin_at_[hidden]>  (847) 691-1404

Boost list run by bdawes at, gregod at, cpdaniel at, john at