3 ms·
It can even go away. The compiler can remove the allocation if the pointer doesn't escape and its lifetime is constrained by block scope. C++ Compilers histori
by gpderetta 8y ago
It can even go away. The compiler can remove the allocation if the pointer doesn't escape and its lifetime is constrained by block scope.
C++ Compilers historically haven't been willing to perform the optimization for various reasons, but things are changing recently.