CTFE Status

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Thu Dec 8 11:58:15 PST 2016


On Thursday, 8 December 2016 at 19:13:23 UTC, Stefan Koch wrote:
> I found the biggest performance bottleneck in newCTFE!
>
> oldCtfe :
> [root at localhost dmd]# time src/dmd -c ctfeTest.d testStringEq.d 
> testStringLength.d testStruct.d testMultipleArrayLiterals.d
>
> real	0m0.026s
> user	0m0.020s
> sys	0m0.003s
>
Before Fixing :
> [root at localhost dmd]# time src/dmd -c ctfeTest.d testStringEq.d 
> testStringLength.d testStruct.d testMultipleArrayLiterals.d 
> -bc-ctfe
>
> real	0m0.025s
> user	0m0.020s
> sys	0m0.003s
>
> After Fixing
>
> [root at localhost dmd]# time src/dmd -c ctfeTest.d testStringEq.d 
> testStringLength.d testStruct.d testMultipleArrayLiterals.d  
> -bc-ctfe
>
> real	0m0.019s
> user	0m0.017s
> sys	0m0.000s

Please note that the ctfe interpretation, with newCTFE, inside 
the frontend takes 10% of the compilation time
Whereas with the old interpreter it takes 50%


More information about the Digitalmars-d mailing list