A Perspective on D from game industry

Kagamin via Digitalmars-d digitalmars-d at puremagic.com
Wed Jun 18 03:40:51 PDT 2014


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.


More information about the Digitalmars-d mailing list