CompileTime performance measurement

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Sun Sep 4 12:36:16 PDT 2016


On Sunday, 4 September 2016 at 12:38:05 UTC, Andrei Alexandrescu 
wrote:
> On 9/4/16 6:14 AM, Stefan Koch wrote:
>> writeln and __ctfeWriteln are to be regarded as completely 
>> different
>> things.
>> __ctfeWriteln is a debugging tool only!
>> It should not be used in any production code.
>
> Well I'm not sure how that would be reasonably enforced. -- 
> Andrei

One could enforce it by defining it inside a version or debug 
block.
The reason I do not want to see this in production code is as 
follows:

In the engine I am working on, communication between it and the 
rest of dmd is kept to a minimum, because :

"The new CTFE engine abstracts away everything into bytecode,
there is no guarantee that the bytecode-evaluator is run in the 
same process or even on the same machine."


More information about the Digitalmars-d mailing list