How to speed up the Rust compiler in 2018
So... grumpy old man response here:<p>These are all tiny, targetted microoptimizations worth a percent or three of benefit in specific tests.  They&#x27;re worth doing (or at least evaluating) in any mature product and I have no complaint.<p>Nonetheless rustc remains <i>really</i> slow relative to other similar technologies, including C++ compilers.  Is there any consensus as to why?<p>I mean, with C++, the answer is something to the effect of &quot;template expansion happens syntactically and generally has to be expressed in headers, leading to many megabytes of code that has to be compiled repeatedly with every translation unit&quot;.  And that isn&#x27;t really amenable to microoptimization.  We all agree that it sucks, and probably can&#x27;t be fixed with the language as it&#x27;s specified, and chalk it up to a design flaw.<p>What&#x27;s the equivalent quip with rustc?  I mean... is it going to get faster (in a real sense, not micro), or is it not?  Is this fixable or not, and if not why?