>>106208807
>>106208886
Blame the language designers for popularizing the heap based approach with garbage collection for OOP. OOP doesn't require heap based allocation and isn't much slower, it all depends on how you draw encapsulation boundaries for objects. If you have an object encapsulate a large array that it works on, it isn't going to be much slower for that one vtable call to work on it.

Don't do vtable lookups / dynamic dispatch in tight loops and have an objects deal with a large amount of data vs dealing with each item separately.

Sometimes a vtable is what you want, but the question is more how often and where and why are you using it.