Hacker News new | ask | show | jobs
by ncallaway 4868 days ago
I think you might have misinterpreted the context of "optimizing a single line of yours using hundreds of different optimization techniques based on a vast amount of academic research that you would spend years getting at" was lost.

He isn't saying compilers are based on a "millions of hours of intense academic research that you won't understand". He's saying the specific optimizations implemented by these compilers are based on "millions of hours of intense academic research that you won't understand".

While the general theory behind compilers isn't particularly complex (and is totally worth learning! Your message about people learning about compilers is spot on), production compilers do employ a significant number of complex optimizations. You won't be able to match these unless you spend a very significant amount of effort learning about these specific optimization techniques.

While learning the theories behind compilers is quite useful, I'd argue that learning N tricks to more efficiently translate C into ASM isn't practical unless you want to turn your compiler into a production one.