logoalt Hacker News

kibwen • today at 5:31 AM • 1 reply • view on HN

Heap allocations aren't really the culprit of the waste that the root comment is talking about. Indirection in general is, and passing around an allocator doesn't guard you against that. Virtual dispatch occurs even for objects on the stack.


Replies

fwlr • today at 6:17 AM

Yes, I was suggesting allocation as another example of the same principle.