Rainer and I collaborated on switching CTFE from using the heap to using a region allocator, which recycles the memory en masse at CTFE exit. Rainer did some benchmarking: dmd 2.088: 1039 MB in 6.6 seconds master: 909 MB in 5.0 seconds https://github.com/dlang/dmd/pull/10396#issuecomment-531454363 and it's looking like a sweet win!