D's treatment of values versus side-effect free nullary functions
Jonathan M Davis
jmdavisprog at gmail.com
Tue Jul 20 16:23:38 PDT 2010
On Tuesday, July 20, 2010 15:49:56 bearophile wrote:
>
> As far as I know, currently optimization level doesn't influence CTFE.
Well, like I said. It depends on what exactly the compiler does, and as far as I
know, it only does CTFE when it has to for initialization. But theoretically, it
could be used for optimizations just like inlining (particularly with pure
functions), and that being the case, it probably will at some point. Not knowing
exactly what it does right now, I don't _know_ that it doesn't do that right
now, but I would expect that you're right and it doesn't currently use CTFE for
optimizations. Hopefully that will eventually happen though.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list