Battle-plan for CTFE
Jonathan M Davis via Digitalmars-d-announce
digitalmars-d-announce at puremagic.com
Fri May 13 14:18:57 PDT 2016
On Wednesday, May 11, 2016 07:06:59 maik klein via Digitalmars-d-announce
wrote:
> What is the current problem with ctfe?
The biggest problem is that it uses up a _lot_ of memory and is generally
slow. For instance, as I understand it, every time it mutates a variable, it
actually allocates a new one to hold the new state. This combined with the
fact that the compiler doesn't actually ever free memory (since it's
normally more efficient for it to work that way), and you risk running out
of memory while compiling. CTFE is a fantastic feature, but it evolved over
time rather than being designed up front, and it's suffered a lot because of
that. Don did a _lot_ of work to improve it, but he wasn't able to continue
working on it, and until now, no one has ever really stepped up to finish
the job. Don's post gives a good background on why CTFE is the way it is
and some of what he did to make it as solid as it is now:
http://forum.dlang.org/post/jmvsbhdpsjgeykpukoxf@forum.dlang.org
But having someone like Stefan reimplement will be _huge_, and the D
community will be _very_ grateful.
- Jonathan M Davis
More information about the Digitalmars-d-announce
mailing list