4 ms·
> The litmus test for simplicity of a programming language design is its compilation speed, if the language compile fast it is simple but if the language compil
by ReleaseCandidat 3y ago
> The litmus test for simplicity of a programming language design is its compilation speed, if the language compile fast it is simple but if the language compile slow it is overly complex
No. OCaml for example has a really fast compiler (like Go), but I would not call it simple. It does have PPX (PreProcessor Extensions) which are like macros, so you can't "blame" the lack of them either.
And everything that uses LLVM is _always_ going to be _slow_, no matter the language.
- pjmlp 3y agoMore to the point, OCaml belongs to the ecosystems that has the golden route, offering multiple implementations, allowing to pick the best one for each workflow. If Rust had an interpreter in the box algonside the compilers like OCaml (there are multiple ones as well), it would already make a big different in development workflows.
- oersted 3y agoSlightly irrelevant fun fact: the Rust compiler was implemented in OCaml for a long time during the R&D phase of the project.
- jfim 3y agoIs there any particular reason for LLVM being slow? Does it do a lot of complicated optimizations when generating code, or is it designed in a way that makes it slow?
- loup-vaillant 3y agoI’ve heard it used to be lean and fast. Then new developers came in, new features were implemented, and it bloated over time. Thus it wasn’t designed in a way that makes it slow. It grew in a way that makes it slow. Source: hearsay.
- foofie 3y ago> I’ve heard it used to be lean and fast. Then new developers came in, new features were implemented, and it bloated over time. That's basically the story of every single software project ever made.
- pjmlp 3y agoNot only that, at the end of ISO C++ Standards Committee Panel Discussion, https://www.youtube.com/watch?v=sf_3Vfh6yRA https://www.youtube.com/watch?v=sf_3Vfh6yRA Someone from the panel clearly mentions that clang and GCC have become slower as some big names have removed their support from the projects (most likely meaning Apple and Google).
- marckerbiquet 3y agoA possible reason is the use of Static Single Assignment (SSA). While it makes many optimizations easier, it has to translate its IR out-of-SSA to generate code. This is very expensive as it needs computation of dominance on the Control Flow Graph, insert copies and much more. But it's just a guess.