News for hackers. Stuff that matters.
Re:"Why is the Rust compiler so slow?" by cogman10 on Thursday June 26, 2025 @05:28PM (#44391630)
Yes but I'd also add that Go specifically does not optimize well.

The compiler is optimized for compilation speed, not runtime performance. Generally speaking, it does well enough. Especially because it's usecase is often applications where "good enough" is good enough (IE, IO heavy applications).

You can see that with "gccgo". Slower to compile, faster to run.

Re:"Why is the Rust compiler so slow?" by cherryteastain on Thursday June 26, 2025 @06:19PM (#44392046)
Is gccgo really faster? Last time I looked it looked like it was abandoned (stuck at go 1.18, had no generics support) and was not really faster than the "actual" compiler.
Re:"Why is the Rust compiler so slow?" by cogman10 on Thursday June 26, 2025 @11:28PM (#44393453)
Digging around, looks like it's workload dependent.

For pure computational workloads, it'll be faster. However, anything with heavy allocation will suffer as apparently the gccgo GC and GC related optimizations aren't as good as cgo's.

Re:"Why is the Rust compiler so slow?" by haiku2077 on Saturday June 28, 2025 @02:10AM (#44402614)
As of about five years ago gccgo was slower for almost all workloads: https://meltware.com/2019/01/16/gccgo-benchmarks-2019.html
Re:"Why is the Rust compiler so slow?" by pclmulqdq on Friday June 27, 2025 @04:21PM (#44399907)
Go defaults to an unoptimized build. If you want it to run heavy optimization passes, you can turn those on with flags. Rust defaults to doing most of those optimizations on every build and allows you to turn them off.