3 ms·
I'm pretty sure it's the hardest language to implement Harder than languages that require JIT compilers to achieve reasonable performance? Even scalac and
by mafribe 10y ago
I'm pretty sure it's the
hardest language to implement
Harder than languages that require JIT compilers to achieve reasonable performance?
Even scalac and ghc are pretty complex beasts in order to Scala and Haskell reasonably speedy.
- Retra 10y agoYou can sink 10 years into just about any software to make it run faster. I wouldn't think that reflects on the inherent difficulty of writing a compiler in the abstract.
- mafribe 10y agoSure, but a simplistic C++ compiler will still produce code of acceptable speed. The same is not true of simplistic compilers for languages like Javascript. Meta-tracing a la PyPy is such a revolution because it enables low-cost creation of reasonably performant tracing JIT compilers.
- wtetzner 10y agoI read the comment as saying C++ is the hardest language to implement, not the hardest language to make fast.
- mafribe 10y agoSpeed and type-inference are the two hard things in compilation in my experience.
- WalterBright 10y agoI've written a Java compiler, and a friend of mine (Steve Russell) wrote the JIT for it (for Symantec). It was the first JITting Java compiler, and took only a few months to complete. Of course, I should have said "front end". Working on the optimizer/codegen is an endless process.
- mafribe 10y agoYes, C++ has a baroque syntax, and I wish lexing/parsing C++ on nobody.