←back to thread

302 points Bogdanp | 3 comments | | HN request time: 0.625s | source
Show context
Scuds ◴[] No.44398706[source]
I have a mac m4 pro and it's 2 minutes to compile all of Deno, which is my go-to for bigass rust projects.

```

> cargo clean && time cargo build

cargo build 713.80s user 91.57s system 706% cpu 1:53.97 total

> cargo clean && time cargo build --release

cargo build --release 1619.53s user 142.65s system 354% cpu 8:17.05 total

```

this is without incremental compilation. And it's not like you have to babysit a release build if you have a CI/CD system

replies(1): >>44400585 #
1. hu3 ◴[] No.44400585[source]
Interesting, M1 Max took 6 minutes and M1 Air took 11 minutes according to this article:

https://corrode.dev/blog/tips-for-faster-rust-compile-times/...

replies(1): >>44401180 #
2. Scuds ◴[] No.44401180[source]
Oh yes, apple hardware continues to improve and M4 pro still the single threaded champion of anything under 300 w.

FWIW - last stage where the binary is produced takes the longest and is single threaded and that's the largest difference between release and debug.

replies(1): >>44404182 #
3. hu3 ◴[] No.44404182[source]
Sounds suspicious to me.

At a quick glance, most benchmarks show only 50% to 60% single threaded improvement between M1 and M4.

That wouldn't explain compilation times going from 6 minutes to 2 minutes.