Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • 2
    @sixlettervariables - possible more that the CPU has branch prediction while a function pointer call involves clearing stack/register. You wouldn't necessarily see this from the assem Commented Jul 25, 2012 at 14:38
  • 1
    depending on funcA and funcBs complexities, they could have been inlined. I agree with @sixlettervariables that checking the assembly is a good idea. It's easy to do, and if nothing else, at least you'll rule out some possible explanations. Commented Jul 25, 2012 at 14:49
  • You can avoid full specialization when you use a templated struct to wrap the specific function. Then you only need to specialize the struct and the cat class needs to be specified only once.
    – tokage
    Commented Jul 25, 2012 at 14:56
  • What processor is this? Also, can you provide a complete SSCCE so I can run this myself?
    – Mysticial
    Commented Jul 25, 2012 at 15:07
  • @tokage wait that is interesting, where can I read about this or how does this work? Commented Jul 25, 2012 at 22:09