3 ms·
indirections, abstraction cost, vtables, cache misses, slow datastructures etc etc etc you might not see it on your i9 with 64gb of memory but your mom's andr
by Shadonototro 6y ago
indirections, abstraction cost, vtables, cache misses, slow datastructures etc etc etc
you might not see it on your i9 with 64gb of memory
but your mom's android phone will struggle
- kaba0 6y agoThere is nothing on this list inherent to OOP. I’m fairly sure C++ is an OOP language (okay, multi paradigm), and their use is “zero-cost” abstraction. Vtables are only necessary for virtual functions, and you similarly have to decide another function implementation if the business logic requires that. Indirection, cache misses do happen with some managed OOP language, but that is due to objects being pointers to heaps instead of stack-allocated. And slow data structures have yet again has nothing to do with it at all. I guess you mean datastructure containing pointers to objects, which is not always the case, and an implementation detail.
- colejohnson66 6y agoObjective C’s whole thing is based on calls to objc_msgSend instead of directly to the intended function. And yet, the first iPhone (running at 400 MHz) handled it fine.