logoalt Hacker News

afdbcreid • yesterday at 10:07 PM • 1 reply • view on HN

It is slow. Nobody would deny that. It also requires work to avoid disastrous compile times, that's also true.

But 15 minutes? Even rustc doesn't take that long (on a powerful computer), and that's a very large program that is compiled at least twice (bootstrapping)! That's just poor engineering, not knowing how to write fast-to-compile Rust code.


Replies

yearolinuxdsktp • today at 12:06 AM

You can't compare rustc to a large application. Yes it's a large program, no it's nowhere near as large as Codex CLI. 1420 crates.

I just did a release build of Codex CLI with "lto = false" for codex CLI binary and code mode host only, and it took 75 minutes, of it 1063 seconds for the final rustc of codex bin. Windows Defender off. That's on a 4-core 2021-era Intel laptop with 32GB RAM and a half-TB SSD. And I can't let the build run at default concurrency, because rustc OOMs the machine, so this is with cargo jobs = 4. Regardless, the final rustc call is independent of that and that was 1063s with lto=false. Previous build was 90 minutes with default thinlto for the same CLI build.

How can Codex write fast-to-compile Rust code, do tell?? Do tell!

➕ show 2 replies