On Monday, 9 May 2016 at 20:24:56 UTC, Walter Bright wrote:
On 5/9/2016 9:57 AM, Stefan Koch wrote:
[...]
The memory consumption problem, at least, can be resolved by
using stack temporaries instead of allocating new nodes. This
was already done in constfold.d, but not in the rest of the
interpreter.
Doing that will (I predict) also double its speed right there.
Thanks, your advice is most helpful and a good first stop-gap.
Still the current state of CTFE is almost not maintainable
and I would really prefer a clean-slate approach.
SDC benefits extremely from the extra level of indirection,
however I do understand that SDC and DMD have diffrent goals
regarding compile-speed.
Also I feel that good code has found it's most beautiful shape
when it's simplicity makes it inevitable, at least the
Ctfe-Mechanism has not reached this point yet, imo.