The cost of doing compile time introspection

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Thu May 11 15:51:03 PDT 2017


On Thursday, 11 May 2017 at 21:57:06 UTC, Timon Gehr wrote:
> On 10.05.2017 16:28, Stefan Koch wrote:
>> On Wednesday, 10 May 2017 at 14:03:58 UTC, Biotronic wrote:
>>> On Wednesday, 10 May 2017 at 11:45:05 UTC, Moritz Maxeiner 
>>> wrote:
>>> [CTFE slow]
>>>
>>> First, as you may know, Stefan Koch is working on an improved 
>>> CTFE
>>> engine that will hopefully make things a lot better.
>>>
>> It will not; This is issue is caused by templates, and not by 
>> CTFE.
>>
>
> I think my measurements show that the main bottleneck is 
> actually Appender in CTFE, while templates contribute a 
> smaller, yet significant, amount.

You are correct.

I should not have made this statement without actually measuring.

Still templates produce the enormous amounts of code that ctfe 
has to wade trough.

So while they are not the bottleneck in this case, they are still 
the cause.



More information about the Digitalmars-d mailing list