3 ms·
> for an experienced C++ programmer who is used to managing memory by hand nobody with an inch of nous does that anymore.
by zabzonk 4y ago
> for an experienced C++ programmer who is used to managing memory by hand
nobody with an inch of nous does that anymore.
- turtledragonfly 4y agoI suppose it comes down to your definition of "by hand," but creating custom allocators for your application and arranging your memory layout carefully can still absolutely be a worthwhile endeavor. Especially when performance matters (eg: high frequency trading systems, video games, constrained embedded systems, and more), the improved locality that you can get from custom memory management can be worth it all on its own. For a good talk on this subject, see Lakos "Local Memory Allocators" presentation: * part 1: https://www.youtube.com/watch?v=nZNd5FjSquk https://www.youtube.com/watch?v=nZNd5FjSquk, part 2: https://www.youtube.com/watch?v=CFzuFNSpycI https://www.youtube.com/watch?v=CFzuFNSpycI
- bluGill 4y agoSure, but those are still carefully controlled places and the majority of code isn't doing it by hand. Not like some old code I've seen where there were many different code paths memory could get ownership transferred to.
- zabzonk 4y ago[flagged]
- jandrewrogers 4y agoManually managing memory is idiomatic for performance engineering in C++. You don't always need to do it but it is definitely done.