<div>I've been trying to work out why my compile times have gone to hell recently.</div><div><br></div>I have a lib, it takes 3.5 seconds to compile.<div>I add one CTFE heavy module, it's not huge, certainly much smaller than the rest of the app, and it blows out to 18 seconds. I've done some experiments removing bits and pieces of code, I can isolate the bits that add seconds to the compile time, but the big offenders are one-line mixins which use CTFE fairly aggressively to generate the strings they mix in.</div>
<div><br></div><div>Can anyone comment on CTFE as implemented? Why is it so slow? It's certainly not executing a lot of code. I can imagine executing the same routine in an interpreted language like lua would take milliseconds or less, not multiple seconds.</div>
<div>What are the bottlenecks? Is there any way to improve it?</div>