3 ms·
It doesn't merely cut allocations in half; it cuts them to zero.
by plorkyeran 6y ago
It doesn't merely cut allocations in half; it cuts them to zero.
- runevault 6y agoDo you mean allocations as in heap? If so yeah, I guess I should have stated it better as it still needs to put space on the stack for the short string.
- josefx 6y agoThe stack space for the whole function call is allocated in one step. You only get individual allocations when you are messing around with variable length arrays or alloca.