Memoization in compile-time

Meta via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Mar 13 11:00:54 PDT 2015


On Friday, 13 March 2015 at 13:51:43 UTC, Dennis Ritchie wrote:
> And you can somehow memoization stuff at compile time?

If you want memoization at compile time I would suggest using the 
template version of Factorial as template instantiations are 
cached by the compiler. However, std.functional.memoize may work 
as well at compile time, I don't know.


More information about the Digitalmars-d-learn mailing list