CTFE Status

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Sun Nov 20 01:02:30 PST 2016


On Saturday, 19 November 2016 at 11:22:18 UTC, Stefan Koch wrote:
> On Saturday, 19 November 2016 at 09:42:33 UTC, Stefan Koch 
> wrote:
>> Another small update.
>> I got rid of the heapClearing overhead.
>> By using ddmds allocator.
>> Because of that I was able to shave off 20ms overhead.
>
> Allocation of dynamic arrays works :)
> The following code will work just fine with the new engine.
> uint[] repeat(uint[] a, uint cnt)
> {
>   uint[] result = [];
>   uint pos;
>   result.length = cast(uint) (a.length * cnt);
>   while(cnt--) foreach(c;a)
>   {
>     result[pos++] = c;
>   }
>
>   return result;
> }
>
> static assert(repeat([1,2,3,4], 4) ==
>   [1,2,3,4, 1,2,3,4, 1,2,3,4, 1,2,3,4]
> );

There is an important change coming up.
I am going to rewrite the 64 bit support.

The after the change the interpreter will be slower when working 
with 64bit values.
However it will be much easier for the jit.

Also I have a lead on howto fix the bugs in break and continue 
handling.

A nice weekend to all of you!


More information about the Digitalmars-d mailing list