From: Bardur A. <sp...@sc...> - 2006-06-16 14:49:14
|
Bardur Arantsson wrote: > Richard Jones wrote: >> On Thu, Jun 15, 2006 at 04:46:03PM +0100, Amit Dubey wrote: >>> I actually have similar code, but I tend to use it over floats more than >>> ints. Maybe this calls for a functor-based design? >> I think it's a fine idea. Are there performance implications? For >> reasons which I can't really fathom, functors don't seem to be fully >> "inlined" when they are created, presumably resulting in extra >> overhead. >> > [--snip--] I said > Even though it may be a tad slower (no inlining), it does allow you to > create Counters which count objects of an identical type *without* being > "compatible". This allows a bit more type safety if you want it. I meant to say: > I would use the functor approach. Even though it may be [...] Cheers, -- Bardur Arantsson <bar...@TH...> Sticks and stones may break my bones, but hollow-points expand on impact. |