Boost logo

Boost :

Subject: Re: [boost] [function] improvements/proposals
From: OvermindDL1 (overminddl1_at_[hidden])
Date: 2010-02-26 23:44:29

On Fri, Feb 26, 2010 at 6:34 AM, Rutger ter Borg <rutger_at_[hidden]> wrote:
> Domagoj Saric wrote:
>> "Mathias Gaunard" <mathias.gaunard_at_[hidden]> wrote in message
>> news:hj1kl5$glt$
>>> You should contact the maintainer of the library, Douglas Gregor, which I
>>> assume is the one taking those decisions.
>> Very well...thanks...
> Given a number of articles on the web titled "Fast Delegates for C++" or
> similar, and how they're supposed to be better and faster than
> Boost.Function, I am curious if you were able to make progress on this
> matter?

Actually, the only reason they outperform boost::function is because
boost::function adds in extra assembly code for a comparison check (to
null, if true it throws an exception). If that is removed (perhaps by
a policy, I certainly know that most of my function would never be
empty, would even be nice if the function defaulted to an empty
function if empty instead), then boost::function becomes even faster.
I have actually started to take a liking to Boost.Variant for function
callbacks (if I know what they can be), it inlines it and the function
pointer call disappears. :)

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