CTFE Status

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Wed Nov 16 01:31:05 PST 2016


On Wednesday, 16 November 2016 at 09:22:01 UTC, Stefan Koch wrote:
> On Tuesday, 15 November 2016 at 23:46:51 UTC, Stefan Koch wrote:
>
>> I suspect that somewhere the heapPtr is not bumped or the 
>> length is not set correctly.
>
> Indeed the length was not set on a code-path meant for 
> resizeing.
> The problem is fixed :)
>
> The HeapLimit has been raised to a more reasonable limit of 2 
> ^^ 24 Addresses. (Which means that you'll have 2 ^^ 24 Bytes in 
> practice.)

In fact, there is a single design decision that fosters these 
kinds of problems.
And that is to go with a low-level IR.

However although it's a tough route. It's also the only solution, 
(the only one I could think of), that will really enable CTFE to 
scale gracefully.

My latest measurements show that even for relatively small arrays 
(2 ^^ 15) bytes.
There is a 2x speedup.
When the interpreter backend.
As soon as my own jit backend is in place the performance will be 
a factor of 6 better.
Makeing newCTFE 12x faster then the current engine, even on small 
one-shot functions!



More information about the Digitalmars-d mailing list