Hacker News new | ask | show | jobs
by runevault 1703 days ago
Part of Rust's problem last I knew was it throws a lot more than it necessarily has to at the LLVM backend. So a front end that takes the time to lessen the burden could run faster despite using the same tooling.
1 comments

Part of it (perhaps the majority) is excessive intermediate code. But at least some of it is that Rust's abstractions are more complex/involved. The "zero cost" doesn't refer to compilation time.
Is that part paid in the Rust or LLVM portion of the compiler chain?
rust portion. For example, LLVM has no internal concept of ownership.
That's true of borrowing, but I'm not sure if it's true for other abstractions. I imagine generics (due to monomorphization) adds to the burden on the LLVM side.