3 ms·
C is far from simple, a simple language would be something like Scheme, Forth, or even SML. It so happens that the C standard (which is nearly 1k pages long now
by AnaniasAnanas 8y ago
C is far from simple, a simple language would be something like Scheme, Forth, or even SML. It so happens that the C standard (which is nearly 1k pages long nowadays) hides a lot of pitfalls, making the job of optimisers, implementators, and regular programmers miserable.
- fooker 8y agoGenerating performant code from Scheme, Forth or SML is far more difficult compared to the C family of languages.
- AnaniasAnanas 8y agoAre you sure about that? Forth is famous for being extremely fast. As for SML, assuming a variant with manual memory management (which I do not consider to add complexity in C), I can't think of any reason on why it would be more difficult to optimise.
- boomlinde 8y ago> Forth is famous for being extremely fast. Have you seen that claim backed up by any evidence produced within the last 25 years?
- fooker 8y ago> I can't think of any reason on why it would be more difficult to optimise. https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/ghc-gpp.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/... The main reason a language like SML or Haskell is difficult to optimize is because it is incredibly difficult to canonicalize for the purpose of making peephole optimizations and abstract interpretation effective. https://sunfishcode.github.io/blog/2018/10/22/Canonicalization.html https://sunfishcode.github.io/blog/2018/10/22/Canonicalizati...