CompileTime performance measurement

Martin Nowak via Digitalmars-d digitalmars-d at puremagic.com
Tue Sep 6 03:46:11 PDT 2016


On Sunday, 4 September 2016 at 00:04:16 UTC, Stefan Koch wrote:
> Hi Guys.
>
> I recently implemented __ctfeWriteln.
> Based on that experience I have now implemented another pseudo 
> function called __ctfeTicksMs.
> That evaluates to a uint representing the number of 
> milliseconds elapsed between the start of dmd and the time of 
> semantic evaluation of this expression.

For bigger CTFE programs it might be helpful.
Milliseconds are a fairly low resolution, would think with hnsec 
or so makes a better unit. Using core.time.TickDuration for that 
would make sense.


More information about the Digitalmars-d mailing list