newCTFE Status August 2017

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Tue Aug 1 14:27:32 PDT 2017


Hi Guys,

At the end of July newCTFE became capable of executing the 
bf-ctfe[1] code and pass the tests.
At 5 times the speed. While using 40% the memory.
(It should be noted that the code generated by bf-ctfe is 
optimized to put as little pressure on ctfe as possible and tries 
to avoid the pathological paths which is why the speed 
improvement is not as high as some other code I showed before)

[1] https://github.com/UplinkCoder/bf-ctfe

I've been hard at work to support complex structs.
which means things like trees or lists which have pointers slices 
and stuff in them :)
as well as multi-dimensional arrays and/or slices.

Sadly I temporarily broke the support for string-members in 
structs.
This Month I intend to fix it again :)
As well as working on supporting bounds-checked pointers.
(meaning pointers created from array literals will still carry 
the array-bounds with them)
The easiest way to do this is unifying the way pointers and 
slices are handled.

As all of these changes affect the ABI they are quite tricky to 
actually execute even if they are not that hard in principle.

If all things go smoothly I will implement union support as well.
(nice safe-unions with a hidden type-field that makes sure you 
can only deref where you previously assigned to)

So stay tuned for updates.

Cheers,
Stefan


More information about the Digitalmars-d mailing list