On Thursday, 8 December 2016 at 19:13:23 UTC, Stefan Koch wrote:
I found the biggest performance bottleneck in newCTFE!

oldCtfe :
[root@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@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@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%

Reply via email to