CompileTime performance measurement

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Sat Sep 3 17:16:15 PDT 2016


On Sunday, 4 September 2016 at 00:08:14 UTC, David Nadlinger 
wrote:
>
> Please don't. This makes CTFE indeterministic.
>
Please elaborate on why this would have a negative impact ?
if someone chooses to use a symbol called __ctfeTicksMs they 
shoud know what they are doing.

> To write performance tests, just measure compilation of a whole 
> program (possibly with -o-). The variance due to the 
> startup/shutdown overhead can trivially be controlled by just 
> executing the CTFE code in question often enough.

That will only allow you to tell how much overall ctfe-time you 
spent.
It will not allow you to pinpoint and optimize the offenders.


More information about the Digitalmars-d mailing list