D's treatment of values versus side-effect free nullary functions
bearophile
bearophileHUGS at lycos.com
Wed Jul 21 03:26:16 PDT 2010
Walter Bright:
> I'm not seeing CTFE as a credible optimization tool, either, as none of my
> programs would benefit at all from it. For example, what's a text editor going
> to precompute?
The manual partial compilation I have explained is useful for numerical code. The example where I have seen improvements was a convolution with small mask. When the mask was known at compile time the compiler has able to speed up code almost twice. Partial compilation can be useful, but it's hard to implement, so I have suggested a practical way to implement it manually, with some syntax sugar.
Bye,
bearophile
More information about the Digitalmars-d
mailing list