How to make a slow compile

monkyyy crazymonkyyy at gmail.com
Sun Aug 24 18:21:50 UTC 2025


On Sunday, 24 August 2025 at 13:59:46 UTC, Andrey Zherikov wrote:
> 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.

What sort of difference did you do? Did the memory usage matter 
for speed at all?


More information about the Digitalmars-d-learn mailing list