2 ms·
That would help some stuff, but it wouldn’t help with monomorphized code or macro expansion. Those two are the real killers in terms of compilation performance.
by josephg 4y ago
That would help some stuff, but it wouldn’t help with monomorphized code or macro expansion. Those two are the real killers in terms of compilation performance. And in both of those cases, most of the compilation work happens at the call site - when compiling your library.
- nicoburns 4y agoWould it not allow macro expansion to be cached? Which I believe it can't be currently because macros can run arbitrary code and access arbitrary external state.
- pjmlp 4y agoEiffel, Ada, D, C++ with extern templates (even better if modules are also part of the story) show ways how this can be improved. Naturally somehow has to spend time analysing how their way maps into Rust compilation story.
- IshKebab 4y agoThose are simply different problems though. Macro expansion is not even exactly a problem. For monomorphized code the compiler just needs a mode where it automatically does what the Momo crate does. For proc macros the Watt crate (precompiled WASM macros) will make a big difference. It just needs official sanction and integration. Anyway yeah those are totally separate problems to caching and distributed builds.