3 ms·
Anybody interested in speeding up the Rust compiler should be looking into generating a new JITted parser after each macro definition, and jumping into it to pa
by ncmncm 5y ago
Anybody interested in speeding up the Rust compiler should be looking into generating a new JITted parser after each macro definition, and jumping into it to parse the remaining (and any other affected) code.
The time to compile a new parser ought to be much less than feeding literally all tokens into a runtime macro-definition interpreter.
Similar infrastructure might help with generics type calculus.
- fanf2 5y agoRust macros only require special parsing for macro arguments, so most tokens don’t need to touch the macro engine.