|
Boost : |
From: Douglas Gregor (doug.gregor_at_[hidden])
Date: 2007-09-18 09:48:54
On Mon, 2007-09-17 at 21:23 +0200, Tobias Schwinger wrote:
> I once hacked a quick benchmark to compare dispatch times of
> Bind&Function (1.34 versions) vs. FastDelegate.
>
> With an inlineable replacement for 'boost::mem_fn' (accepting the member
> function pointer as a non-type template argument)
>
> http://tinyurl.com/37tkap
>
> FastDelegate turned out to be (not quite) twice as fast as Function&Bind
> with MSVC, which isn't that much IMO held against the lost flexibility,
> such as not being able to use arbitrary function objects and only
> binding 'this'.
FastDelegate will always have faster invocation, because it optimizes
for a very narrow set of cases.
The invocation performance of Boost.Function won't have changed much
from 1.33.x to 1.34.x. It's the copy performance that drastically
improved. That part of the benchmark should be re-run with Boost 1.34.x.
- Doug
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk