
6 Jan
2011
6 Jan
'11
9:02 a.m.
At Wed, 5 Jan 2011 15:04:04 -0500, Howard Hinnant wrote:
On Jan 5, 2011, at 2:45 PM, Howard Hinnant wrote:
It doesn't seem to be any slower! :-)
Correction: If the compiler can see that the functor always returns false it isn't any slower. If it can't (separate compilation unit, or whatever), there's about a 12% speed hit.
That is consistent with my understanding of modern optimization capabilities. I wonder if link-time optimization can quash that 12% as well? Anyway, for algorithms like I think the separate-compilation case doesn't matter much. -- Dave Abrahams BoostPro Computing http://www.boostpro.com