Hacker News new | ask | show | jobs
by moonchild 2230 days ago
Sounds like the 'sufficiently smart compiler[1] myth.

1. https://wiki.c2.com/?SufficientlySmartCompiler

1 comments

It's both. With bad language design you won't get fast code (at least without going through insane loops).

But even with good language design the compiler need to use them, which needs time to be implemented etc.

So in practice it's often more a mixture between how easy/hard the language makes optimizations and how much work (with given expertise) was put into the compiler optimizations.

Through there are insane optimization which need to high amount of knowledge about the code and as such which you will have a really had time to ever realize with Asm,C or similar. But most time they aren't worth it as getting them right is hard and the time is often better spend with adding more straight forward optimizations, maintaining the compiler code etc.