Live data from Hacker News

Rust compiler performance

kobzol.github.io

1–10 of 264 posts

Re: Rust compiler performance

#3
post #2

I'd vote for filesystem space utilization to be worked on before performance.

Is this not more a Cargo thing? Cargo is obsessed with correct builds and eventually the file system fills up with old artifacts.

(I know, I have to declare Cargo bankruptcy every few weeks and do a full clean & rebuild)

Re: Rust compiler performance

#4
post #2

I'd vote for filesystem space utilization to be worked on before performance.

The problems are largely related. Cut down the amount of intermediate compilation artifacts by half and you'll have sped up the compiler substantially. Monomorphization and iterator expansion and such is a significant contributor to both issues.

Re: Rust compiler performance

#5
post #2

I'd vote for filesystem space utilization to be worked on before performance.

Is this not more a Cargo thing? Cargo is obsessed with correct builds and eventually the file system fills up with old artifacts. (I know, I have to declare Cargo bankruptcy every few weeks and do a full clean & rebuild)

Correct builds != never running garbage cleanup. I would settle for it evicting older variants of a build (I also dislike the random hash that’s impossible to determine what specifically is different between two hashes / which one is newer).

Re: Rust compiler performance

#7

Earlier quoted context omitted.

Is this not more a Cargo thing? Cargo is obsessed with correct builds and eventually the file system fills up with old artifacts. (I know, I have to declare Cargo bankruptcy every few weeks and do a full clean & rebuild)

Correct builds != never running garbage cleanup. I would settle for it evicting older variants of a build (I also dislike the random hash that’s impossible to determine what specifically is different between two hashes / which one is newer).

Automatic garbage collection of old build artifacts* is coming in Rust 1.88 (currently on the beta channel, will become the new stable release in two weeks):

https://github.com/rust-lang/cargo/issues/12633

*EDIT: For now this only deletes old cached downloads, not build artifacts. Thanks epage for the correction below.

Re: Rust compiler performance

#9
I wonder if how much value there is in skipping LLVM in favor of having a JIT optimized linked in instead. For release builds it would get you a reasonable proxy if it optimized decently while still retaining better debugability.

I wonder if the JVM as an initial target might be interesting given how mature and robust their JIT is.

Re: Rust compiler performance

#10
post #7

Earlier quoted context omitted.

Correct builds != never running garbage cleanup. I would settle for it evicting older variants of a build (I also dislike the random hash that’s impossible to determine what specifically is different between two hashes / which one is newer).

Automatic garbage collection of old build artifacts* is coming in Rust 1.88 (currently on the beta channel, will become the new stable release in two weeks): https://github.com/rust-lang/cargo/issues/12633 *EDIT: For now this only deletes old cached downloads, not build artifacts. Thanks epage for the correction below.

That’s as an additional flag and not the default?
Post reply on HN