3 ms·
The whole point of explicit memory management is to avoid memory allocation and deallocation calls in the first place (by controlling where and when allocation/
by flohofwoe 4y ago
The whole point of explicit memory management is to avoid memory allocation and deallocation calls in the first place (by controlling where and when allocation/deallocation exactly happens, and that should not be anywhere near a hot code path). And with that, allocator performance doesn't really matter anymore (that's also why 'fast' memory allocators like mimalloc or jemalloc are really kinda pointless, if those make a measurable performance difference, than the code is already calling the alloc/free functions way too often.
- kaba0 4y ago> explicit memory management is to avoid memory allocation and deallocation calls in the first place No, it isn’t. Memory management. Also, so you want to write code with hardcoded sizes for everything or what? Yeah, I surely want programs that die on a string of length 35 because only 32 were allocated upfront. Also, managed languages can have hot loops without any allocation going on, you know right?
- flohofwoe 4y agoYou really need to spend a bit of time to educate yourself and tinker a bit with manual memory management (there's a bit more to it than just calling malloc/free each time you need to grab 35 bytes of memory).
- kaba0 4y agoThank you very much, I’m quite familiar with it. As are professionals who write those GC systems we are talking about, probably much much more so than any of us.