[Help Needed] - Debugging compilation time

apz28 home at home.com
Fri Oct 21 18:14:48 UTC 2022


On Friday, 21 October 2022 at 16:32:17 UTC, Hipreme wrote:
> Hey guys, I have been complaining a lot of time right now from 
> D compilation speed at least for my project.
>
> I have:
> - Underused CTFE
> - Underused Templates
> - Avoided importing standard libraries
> - Created a multi module projects for better code reuse
>
>

The slow is from executing CTFE (template constraints, enum 
expression, static if ...). The culprit is this function:  
Expression.ctfeInterpret() in this module dmd.expression.d
Even for compiling DMD, that function will take 1/3 of total times

Try to reduce CTFE usage than it will be fast again. D should 
analyze to make executing CTFE faster

Cheers




More information about the Digitalmars-d-learn mailing list