4 ms·
True, I was talking about the general case. This is a bit similar to local variables: they have to be allocated on the heap in the general case, but Go uses es
by sltkr 6y ago
True, I was talking about the general case.
This is a bit similar to local variables: they have to be allocated on the heap in the general case, but Go uses escape analysis to determine which local variables can safely be allocated on the stack instead, which is much cheaper.