4 ms·
What about values that aren't needed at compile time, but can be so optimized.
by danellis 9y ago
What about values that aren't needed at compile time, but can be so optimized.
- Veedrac 9y agoD still has optimization passes.
- Doxin 9y agoRunning code at compile time in D is not an automatic optimization. Only code in certain constructs are ran at compile time, for example function calls in variable declarations or static if statements. Generally it's not something you even need to think about. This runs foo() at compile time: int bar=foo(); This runs foo() at runtime: int bar; void main(){ bar=foo(); }