News for hackers. Stuff that matters.
Re:Compiler Development: Rust or OCaml? by memefrog on Monday August 07, 2023 @06:19PM (#37041730)
I am not sure that the runtime efficiency of the compiler binary is that important. People like fast compile times, but that is more to do with language design than the choice of language for the compiler.

You could write a compiler for Pascal in Python or another very slow language and it would be faster than a Rust or C++ compiler written in Rust or C++. That is because those languages have designs that make compilation algorithmically slow, while Pascal was designed to be fast to compile.

Re:Compiler Development: Rust or OCaml? by nine_k on Monday August 07, 2023 @10:47PM (#37043889)
Almost every compiler is fast on toy-sized programs. E.g. the standard Java compiler is pretty fast, and uses little resources.

It becomes visible when you build a large project: you notice that when you face 100k LOCs, efficiency of every compiler's part starts to matter, and RAM usage may grow to uncomfortable levels if your compiler does not care enough.

Re:Compiler Development: Rust or OCaml? by memefrog on Tuesday August 08, 2023 @02:26AM (#37045234)
Yes, some compilers are slow on large programs because they don't scale well. Others aren't, because they do. That's what I said.
Re:Compiler Development: Rust or OCaml? by curling_grad on Monday August 07, 2023 @11:41PM (#37044250)
If the compiler is for JIT, then efficiency will be important.
Re:Compiler Development: Rust or OCaml? by fauigerzigerk on Tuesday August 08, 2023 @03:03AM (#37045487)
>People like fast compile times, but that is more to do with language design than the choice of language for the compiler.

People like fast compile times and people either like to use (or are forced to use) languages that are inherently slow to compile. That's exactly why compiler performance is absolutely critical.