logoalt Hacker News

amelius • yesterday at 8:36 PM • 3 replies • view on HN

There's really a paradox here. Rust claims to be a fast language, but compiling, even without optimizations on, takes ages ...


Replies

barchar • yesterday at 10:09 PM

Rust encourages a kind of generic programming that can result in generating too much code.

The compilation model is vastly, vastly, vastly better than languages like C++ and C, though, and it does compile much faster than an equivalent C++ build (doesn't count if you download precompiled binaries of your c++ dependencies)

IshKebab • yesterday at 10:08 PM

That's not a paradox, that's how it always works. Compiling to fast machine code requires more work and takes longer.

Is Python a fast language because it barely takes any time to compile the code? No obviously not.

➕ show 2 replies
kibwen • yesterday at 9:15 PM

There's no paradox here. You can use any benchmark you like to prove that Rust is a fast language. The work that the compiler does is irrespective of the language that rustc is written in.

➕ show 1 reply