On 11/26/2014 4:40 PM, Ali Çehreli wrote:
[...]
     override
     size_t toHash() @trusted pure const nothrow
     {
         auto func = assumePure(&(typeid(importantStuff).getHash));
         return func(&importantStuff);
     }

Very helpful, thanks! Am I right in assuming that there is some runtime cost here, as we are calling through a function pointer? Is the lack of inlining the only cost, or is getting at the typeinfo also costly?

Dave


Reply via email to