Battle-plan for CTFE

Stefan Koch via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sun May 15 05:02:37 PDT 2016


On Sunday, 15 May 2016 at 10:29:21 UTC, Martin Nowak wrote:
> On 05/10/2016 08:45 AM, Jacob Carlborg wrote:
>> 
>> I was listening to a discussion Don and Daniel had about the 
>> current implementation of CTFE. They talked about using a byte 
>> code interpreter. Even implementing a really crappy byte code 
>> interpreter would be a huge improvement.
>
> No need for a byte-code interpreter, it mostly just adds 
> overhead and complexity over an AST interpreter. If you want to 
> go really fast you need some sort of JIT anyhow, but a proper 
> interpreter will be orders of mangnitude faster than the 
> current implementation.
>
> I might refer you to
> http://dconf.org/2013/talks/chevalier_boisvert.pdf
> page 59 ff.

Correct. A ByteCode Interpreter will add even more implementation 
overhead, and the benefit is only realizable if the ByteCode  is 
a standard format that can be read other backends such as a jit.



More information about the Digitalmars-d-announce mailing list