Skip to content

Conversation

@zetanumbers
Copy link

Decreases rust's incremental compilation roughly by a factor of 3.

Specifically tests' build time with:

touch crates/compiler/parse/src/parser.rs # retrigger incremental compilation with zero changes
cargo build --tests

on i7-13700 decreases from 15.86s down to 5.42s.

Clean build time also decreased from 42.07s to 31.24s.

@Anton-4
Copy link
Collaborator

Anton-4 commented Nov 17, 2025

Hi @zetanumbers,
We've been hard at work on the new compiler written in zig (see src folder) so we have not upgraded the old compiler written in rust. I suspect it will take much more changes before you can get all of CI to pass. If you want to make those changes I will review them but we do not see substantial value in a rust upgrade of the old compiler. Sorry to disappoint!

@zetanumbers
Copy link
Author

After some testing I can say a large portion (16.05s -> 8.13s) of build time reduction was caused by rust switching to lld by default on x86_64 linux (rust-lang/rust#140525).

@Anton-4
Copy link
Collaborator

Anton-4 commented Nov 17, 2025

Oh yeah, we were using lld in some places but not everywhere I think. I would still prefer to avoid making the switch now, the old compiler had several flaky issues and changing things up here could make them worse

@zetanumbers
Copy link
Author

You should delete the old compiler code if it's not maintained.

@Anton-4
Copy link
Collaborator

Anton-4 commented Nov 19, 2025

The new compiler is still missing a lot of features, so we keep the old one around. We also still fix docs issues and other issues that are really bothering people. I just don't want to risk making the compiler or CI more flaky for a speedup that would mainly benefit compiler developers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants