3 ms·
Do 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.
by runevault 6y ago
Do 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.