Ref counting for CTFE?
Ary Borenszweig via Digitalmars-d
digitalmars-d at puremagic.com
Thu May 29 09:13:39 PDT 2014
On 5/29/14, 12:22 PM, Steven Schveighoffer wrote:
> One subject that frequented the talks at dconf was the poor performance
> of CTFE and mixins.
>
> The major issue as I understand it (maybe I'm wrong) is the vast amounts
> of memory the compiler consumes while building mixin strings. In fact,
> one of the talks (can't remember which one) mentioned that someone had
> to build their project in steps so the compiler did not crash from OOM.
If you add reference counting or a GC to the compiler, it will make
those large projects compile, but it will inevitably be slower than now.
That's why Walter disabled GC completely in the compiler (turning it on
made the compiler really slow).
I think the right steps are:
1. Enable some kind of GC
2. Profile and see where are the bottlenecks.
3. Optimize those cases.
4. Go to 2.
More information about the Digitalmars-d
mailing list