CTFE Memory Hogging Workaround?

bearophile bearophileHUGS at lycos.com
Thu Nov 22 14:27:25 PST 2012


Maxime Chevalier:

> One of the reasons I chose to use D for my project is that I 
> was very excited about the prospect of using CTFE in mixin 
> code. Unfortunately, there seems to be one (or several?) bugs 
> causing CTFE to be very slow and to hog a huge amount of memory 
> (multiple gigs of RAM and swap).
>
> Is there some known fix for this? I need this to work now. 
> Otherwise, I'm going to have to rewrite my CTFE/mixin code in 
> Python or something, which would be a shame, and a waste of 
> time on my part.

Please use D.learn newsgroup for similar questions, this group is 
not for discussions.

There are coding strategies to partially reduce the memory used 
during CTFE, but in general it uses lot of memory, sometimes too 
much. This problem is well known and Don is working on it and he 
has improved the situation a little, but it will take time to fix 
it well, possibly some months or more.

Currently CTFE is not fit for heavy computations.

Bye,
bearophile


More information about the Digitalmars-d-bugs mailing list