4 ms·
> So it's not the exact same thing as allocating on the call stack, but it's not far. Unfortunately it is far. Creating an address is quick, yes. But that addr
by kllrnohj 6y ago
> So it's not the exact same thing as allocating on the call stack, but it's not far.
Unfortunately it is far. Creating an address is quick, yes. But that address consistently won't be in L1/L2. Likely won't even be in L3. And if it's a return value containing more than one allocation that's easily more than one cache miss along with dependent reads.