Re:Data-oriented design or why you might shoot yourself in t...
by AdieuToLogic on Monday June 28, 2021 @10:35PM
(#27671071)
> Inheritance isn't the root of all evil, dynamic dispatch is. It's a remarkably powerful implementation detail but one with enormous cost ...
Dynamic dispatching typically costs one pointer lookup in a vtable[0]. By "typically", I specifically mean "in any production quality run-time environment." This is not an "enormous cost" by any reasonable definition.
Dynamic dispatching typically costs one pointer lookup in a vtable[0]. By "typically", I specifically mean "in any production quality run-time environment." This is not an "enormous cost" by any reasonable definition.
0 - https://en.wikipedia.org/wiki/Virtual_method_table