News for hackers. Stuff that matters.
Re:What part of Rust compilation is the bottleneck? by makapuf on Saturday March 16, 2024 @05:33AM (#39724467)
That is definitely true, but from the article it's the backend that takes time, not the frontend where the language itself resides. If you compile go from llvm, it maybe as long as rust.
Re:What part of Rust compilation is the bottleneck? by GrumpySloth on Saturday March 16, 2024 @06:16AM (#39724649)
It’s not just Rust. Practically every compiler based on LLVM is slow. Swift, Zig, Clang.

The Go compiler being written from scratch based on the Plan9 C compiler is a huge advantage.

Re:What part of Rust compilation is the bottleneck? by kjksf on Saturday March 16, 2024 @08:18AM (#39725262)
Minor correction: Go compiler used to be a modification of Plan9 C compiler, then a Go port of that modification but then it was completely rewritten as a SSA-based compiler so today it has almost nothing to do with the original Plan9 code.
Re:What part of Rust compilation is the bottleneck? by rvdca on Saturday March 16, 2024 @08:08AM (#39725179)
I will chime in to day that rust is also building a alternative to the LLVM backend in the form of cranelift : https://github.com/rust-lang/rustc_codegen_cranelift
Re:What part of Rust compilation is the bottleneck? by txdv on Saturday March 16, 2024 @07:20AM (#39724897)
Zig is moving away from LLVM. Its already has its own backend targeting debug builds for x86 and arm. ReleaseFast and ReleaseSmall is an entire different beast, but its going to be tackled eventually.
Re:What part of Rust compilation is the bottleneck? by KingOfCoders on Saturday March 16, 2024 @05:46AM (#39724520)
I wonder why we do not split up compilation more - especially for web developer. Rust does this a little with "check", C with "-O".

I want fast compilation for my dev cycle or for unit tests, I want slow compilation with optimizations, escape analysis, correctness etc. for production (the distinction between a compiler and linter is also not clear, some compiles do what linters do in other languages).

Re:What part of Rust compilation is the bottleneck? by jokethrowaway on Saturday March 16, 2024 @05:55AM (#39724555)
We do, you have profile configuration for dev or for release

You can get pretty big differences in terms of compile speed / binary size

Re:What part of Rust compilation is the bottleneck? by IshKebab on Saturday March 16, 2024 @11:17AM (#39726655)
Giving up entirely on the compile time of "performance" builds can be bad too though, e.g. for people writing games, audio software, etc.
Re:What part of Rust compilation is the bottleneck? by bluGill on Saturday March 16, 2024 @01:21PM (#39727711)
Only if you need to test the full game. If you can unit test algorithms and learn something then fast builds matter.