News for hackers. Stuff that matters.
Re:Parsing Awk Is Tricky by moomin on Monday September 02, 2024 @05:11AM (#41423833)
Pretty sure Rust's compile times are a function of the complex type system and generic instantiation. Everything's a trade-off.
Re:Parsing Awk Is Tricky by masklinn on Monday September 02, 2024 @05:41AM (#41423987)
Except in some rare edge cases, it’s mostly the latter, indirectly: in the average crate the vast majority of the time is spent in LLVM optimization passes and linking. Sometimes IR generation gets a pretty high score, but that’s somewhat inconsistent.
Re:Parsing Awk Is Tricky by dotancohen on Monday September 02, 2024 @05:35AM (#41423956)
Which are damn more important (to me) than is the compile time metric.
Re:Parsing Awk Is Tricky by fnord77 on Monday September 02, 2024 @11:10AM (#41426054)
IIRC, rust's long compile times are because it is basically doing static analysis, looking for potential errors
Re:Parsing Awk Is Tricky by pornel on Monday September 02, 2024 @11:31AM (#41426287)
`cargo check` that does all the parsing, type system checks, and lifetime analysis is pretty fast compared to builds.

Rust compilation time spends most time in LLVM, due to verbosity of the IR it outputs, and during linking, due to absurd amount of debug info and objects to link.

When cargo check isn't fast, it's usually due to build scripts and procedural macros, which are slow due to being compiled binaries, so LLVM, linking, and running of an unoptimized ton of code blocks type checking.