7 ms·
You mentioned that std::unique_ptr had a runtime cost (versus a raw pointer). I had always assumed the compiler would optimize any of that away (if you have the
by funkychicken 2y ago
You mentioned that std::unique_ptr had a runtime cost (versus a raw pointer). I had always assumed the compiler would optimize any of that away (if you have the default deleter). Could you explain what you meant?
- saagarjha 2y agoI assume this is the example presented here: https://youtu.be/rHIkrotSwcc?t=1050 https://youtu.be/rHIkrotSwcc?t=1050
- funkychicken 2y agoOh thanks! That’s really depressing though, I feel like my whole world view has been shattered lmao