On Wednesday, 18 June 2014 at 07:58:57 UTC, c0de517e wrote:
People think that implementing interfaces is for some reason inherently slower than templates, the same they believe function pointers are slower than functors. It's FALSE. The ONLY reason why templates and functors can be faster is because they are always inline, the compiler knows exactly what to call without indirections.

The processor needs to know what to call too, when it doesn't, it stalls. That means, the code executes slower.

Reply via email to