6 ms·
That would still require dynamic dispatch of some kind.
by Rusky 8y ago
That would still require dynamic dispatch of some kind.
- the_mitsuhiko 8y agoBut it wouldn’t require a heap allocation.
- lmm 8y agoWhere is the proxy implementation going to go if not the heap?
- GolDDranks 8y agoThe proxy object would have statically known size (maximum of the size of the types it dispatches between, plus some metadata such as a vtable pointer or an enum discriminant). Now, because you know the size statically, you can store it in the stack.