2 ms·
The C++ model is that in theory there is an allocation, in practice depending on how a specific library was written, the compiler would be able to elide the all
by pjmlp 1y ago
The C++ model is that in theory there is an allocation, in practice depending on how a specific library was written, the compiler would be able to elide the allocation.
It is the same principle that drives languages like Rust in regards to being safe by default, in theory stuff like bounds checks cause a performance hit, in practice compilers are written to elide as much as possible.