CTFE Status
Stefan Koch via Digitalmars-d
digitalmars-d at puremagic.com
Wed Dec 7 11:19:08 PST 2016
On Wednesday, 7 December 2016 at 18:50:20 UTC, Stefan Koch wrote:
> On Wednesday, 7 December 2016 at 18:00:40 UTC, Stefan Koch
> wrote:
>> I have an update about ctfe performance.
>> I wondered for quite a while why newCTFE had a 5 millisecond
>> overhead, when compared the old interpreter.
>> Since on my charts it had comparable or better stats.
>> I finally figured it out.
>>
>> Because the interpreter is supposed to be ctfe-able itself it
>> uses a gc-allocated stack.
>> And that in turn call envokes the gc.
>> The mark phase of the garbage-collector matches up exactly
>> with the extra time taken.
>>
>> I have no idea, why this happens though since the GC is
>> supposed to be disabled.
>
> It turns out that almost classes in dmd that are em-placed.
> Whereas by bytecode visitor uses the regular new, because it is
> fairly sizable. The gc is much more visible.
>
> Although that does still not explain why GC.disable seems to
> have no effect.
After a few more iterations the observed slow down seems to
disappear.
I am suspicious.
More information about the Digitalmars-d
mailing list