4 ms·
One thing I've heard about even modern compilers is that they don't really release memory during compilation, as it's faster just to use the memory and release
by winrid 4y ago
One thing I've heard about even modern compilers is that they don't really release memory during compilation, as it's faster just to use the memory and release it all when the process exits. How true is that?
- melissalobos 4y agoIt is true that that is of course faster. However, clang and GCC, both do release memory since with modern C++ software projects, it can take huge amounts of ram to compile them. https://dmalcolm.fedorapeople.org/gcc/newbies-guide/memory-management.html https://dmalcolm.fedorapeople.org/gcc/newbies-guide/memory-m...
- chrisseaton 4y ago> It is true that that is of course faster. Is it? What do you base that on? I would guess that this hypothesis was true at one time, but is no longer, due to relative memory latencies increasing that mean that the resulting lack of locality becomes a very big problem. I think this is empirically support by for example this research result, where epsilon collectors are not the highest throughput. https://users.cecs.anu.edu.au/~steveb/pubs/papers/lbo-ispass-2022.pdf https://users.cecs.anu.edu.au/~steveb/pubs/papers/lbo-ispass...
- deleted 4y ago[deleted]
- octoberfranklin 4y agoThe nix programming language's interpreter deliberately has no memory garbage collector based on this argument. This decision does force a few other architectural decisions, and as a result has led to a few firey debates. Most nix users are surprised to learn that nix has no GC. It's unfortunately hard to search for details about this since nix uses the phrase "garbage collection" to describe something it does to the filesystem, rather than memory.
- deleted 4y ago[deleted]