How to make a slow compile

Andrey Zherikov andrey.zherikov at gmail.com
Sun Aug 24 13:59:46 UTC 2025


On Wednesday, 20 August 2025 at 15:33:45 UTC, monkyyy wrote:
> once again dconf contains people who talk about compile speed 
> as if it can be slow
>
> What are they doing? Even my worse compile time abstraction was 
> O(n^2) or maybe some awful string concatenation of an entire 
> file; still effectively instant
>
> Wheres a 1000 line file that does something meta programmingly 
> useful that takes 5 minutes?
>
> Do they lose track of what the compiler is even doing? Do they 
> turn off the template recursion depth limit?

My recent experience: removing usage of SumType and replacing it 
with my own solution reduced dmd memory usage from 6GB to 1.7GB 
and improved compilation speed.


More information about the Digitalmars-d-learn mailing list