3 ms·
Dmitry Olshansky has written an experimental extension to the D compiler to cache the results of CTFE (compile time function evaluation) between compiles. CTFE
by WalterBright 9y ago
Dmitry Olshansky has written an experimental extension to the D compiler to cache the results of CTFE (compile time function evaluation) between compiles. CTFE started out as just a more capable constant folder, but has evolved into a way to run arbitrarily complex programs at compile time. It's used to generate regex machines and grammar parsers, for example. These can slow down compilation significantly, so the idea with the cache is to remember previous results to avoid recomputation.