
15 Feb
2004
15 Feb
'04
7:08 p.m.
"Hurd, Matthew" <hurdm@sig.com> wrote
The numbers I got give me ~18 microseconds overhead per single boost::function call (raw call takes ~404 microseconds).
Also the 18 microseconds cost you measured, or roughly 30 microseconds benefit measured with my optimisation settings, can't just be put down to the boost::function difference I think as 18 microseconds is 36,000 cycles at 2 GHz and I don't think boost function could possibly cost that.
18 microseconds looks a lot to me, too. But I think there's some low limit deduced from RAM access speed. My engineering guess is there are few more memory accesses with boost::function and these will take each tens to hundreths of nanoseconds. /Pavel