On Friday, 15 October 2021 at 21:58:29 UTC, Paul Backus wrote:
On Friday, 15 October 2021 at 15:19:26 UTC, Imperatorn wrote:
Btw, why is dmd a memory hog?
Because it doesn't free memory. It just allocates, and relies
on the OS to clean up at process exit.
See https://www.digitalmars.com/articles/b87.html
lowmem actually isn't much better sometimes. There are issues
with references being held and confusing the GC, also.
You can see this, if you use either massif or enable the GC. The
peak heap collapses but at not much expense in runtime. Sometimes
however, the GC makes no difference - I noticed this when
benchmarking AliasAssign, you'd expect the old assigned-to memory
to be freed but this doesn't seem to be the case empirically.