Hacker News new | ask | show | jobs
by qznc 3454 days ago
I don't know why you are down voted. Compile time is a Rust issue for me. I'm spoiled by D. However I'm not sure if borrow checking is inherently slow. The release notes are discouraging. 30% faster? Aim for 10 times faster. Maybe it is just the LLVM backend. It still is slow.
4 comments

> Maybe it is just the LLVM backend. It still is slow.

It's a combination of two things, as far as I know.

1. The LLVM backend is slow.

2. The Rust frontend has historically abused the LLVM backend badly, by feeding it large amounts of barely optimized code. This is being worked on, but it's going to take a while.

> 2. The Rust frontend has historically abused the LLVM backend badly, by feeding it large amounts of barely optimized code. This is being worked on, but it's going to take a while.

That's what I heard 2~3 years ago.

Yes, it's taken a _long time_ to pay down the technical debt from writing a compiler in itself for years. A huge step forward for doing so landed fairly recently, MIR, so progress is being made. It's already resulted in significant improvements, and will lead to more in the future.
> Aim for 10 times faster.

What you aim for and what you achieve are different things. These things take time. We've been getting faster every release. 10x faster within a single six-week period is not realistic.

(Borrow checking is not generally the slowest part; it's the codegen. Which is LLVM. But also is the IR we feed to LLVM.)

Same here, I only dabble in Rust, but still looking forward to get an improved experience.

Every time a new release happens, it takes around one hour to update all VSCode related tooling.

D is not fast enough either, I only like Java (with the eclipse compiler), Golang and obviously the dynamic languages
Go is fast. D is fast, but its compile time meta programming features can make it arbitrarily slow.

Java, Python, etc actually compile at run time so the comparison is invalid. You can measure the full iteration speed, but then image based wins (Smalltalk, Common Lisp).

AOT compilers for Java do exist and are quite fast.