Would JIT-compiling a C++ template at compile time be a viable strategy for faster compile times? Is this maybe already done in large compilers like LLVM, and if not, what are the (maybe obvious) downsides making this non-viable?
For clarification, what I mean is that one takes the C++ template language, not as an interpreted system for generating C++ AST, but as a JIT-compilable language that one passes to e.g. LLVMJit or similar systems that emit binary blobs that in-turn generate the resulting AST of the template application result, given the template arguments.
Would this theoretically speed up some compilation times? AFAIK, JIT/interpretation speedup depends heavily on the frequency of the called code, but I can imagine some templates as being applied many times.