frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

How to speed up the Rust compiler in September 2026

https://nnethercote.github.io/2026/09/30/how-to-speed-up-the-rust-compiler-in-september-2026.html
53•trickypr•1h ago

Comments

torutofu•1h ago
Incremental seems to keep winning the easy wins, so the interesting part is whether the remaining compile-time still lives in the same places as last year.
Citrusoff•1h ago
The EverInitializedPlaces example really stands out. Going from ~1.5M to ~90K apply_effects_in_block calls by changing the CFG traversal is a reminder that the biggest compiler optimizations often come from changing the algorithm, not optimizing the hot loop itself.

It also seems like the new Polonius/trait-solver work is pushing compiler performance toward a more interesting problem: doing expensive analysis only when it is actually needed.

4.57% mean wall-time reduction across 629 benchmarks in two months is pretty remarkable. Great progress.

embedding-shape•51m ago
> reminder that the biggest compiler optimizations often come from changing the algorithm, not optimizing the hot loop itself.

Isn't this true for most optimizations, not just in compilers? My usual goto process for optimizing is "Find stuff we're doing that we don't have to do, re-evaluate what data structures we use and then re-evaluate what algorithms we use" basically, with minor changes depending on the results. Served me well so far, and haven't (intentionally) written any compilers.

Surac•52m ago
Why is the compiler slow in the first place? I have no rust knowledge, how slow us slow, lets say in comparison to a c compiler?

What is the performance killer?

JMKH42•48m ago
Its similar to C++ compilers, there is no one reason. It is a language that tries to optimize a lot, its a big language, it does safety checks, it uses llvm which is a bit slow, its a language that makes use of generics which generate extra code etc etc.
ModernMech•39m ago
It's doing static analysis that many other languages don't do at compile time.
dralley•33m ago
This is not actually the main reason, most of the time.

Generics/monomorphization and how iterators work results in a lot of compiler bytecode that has to be churned through. More bytecode = longer compilation. It increases the size of the (debug) binaries, the debuginfo in general, causes performance issues with debug binaries in some situations unless you bump the optimization level, causes more IO, etc.

ModernMech•29m ago
Okay but if you don't use generics and monomorphization, then what explains it?
dralley•17m ago
adamch•47m ago
I'm glad to see the donations from big companies to open source maintainers are making measurable difference to the Rust experience. Telling these companies that their employees spend 5% less time waiting for compilation might motivate future investment in people like Nick and the others mentioned.
bryanlarsen•41m ago
Really nice to see that the 5% speedup is despite making the borrow checker better, validating code that previously would have tripped it up.

Sometimes we really can have our cake and eat it too.

It's unlikely that many people are using Rust without using Option<T> or Result<T, U> a fair bit. Idiomatic Rust fundamentally uses a lot of generics. And a basic for loop expands into quite a large Iterator trait implementation.
thevinter•38m ago
First of all, the fact that the article talks about "speeding up" the rust compiler doesn't automatically mean that the compiler is "slow"[0].

Now, is rustc slower than e.g. clang? by how much? why?

Those are different (and complicated) questions. It really depends on what you're compiling, but I'd say rustc can be 1-5x slower (maybe more at times?).

The reasons are many and varied, but in general rust compilation is slower because the compiler is doing way more things compared to C (monomorphization, complex trait resolution + type inference, borrow checker..)

[0]: Also I'd argue that "slow" without a concrete point of reference is a meaningless term in this context.

jerf•37m ago
Doing stuff isn't free. For instance, Go compiles relatively quickly for a modern language, but the biggest reason for that is that it does less stuff than most compilers... less optimization, less checking, and some stuff built into the language to avoid some of the problems with having to read lots of headers just to compile a file and other ways of doing less stuff, but mostly the key is it does less stuff, in both the good and bad senses of that.

If you want something like Rust that offers guarantees and checks and cross-checks by the boatload, it adds up. Macros, monomorphization, implicit code generation with traits and all those other things add up too. And you can't always get O(n) or O(n log n) code to implement those checks. Maybe it can be sped up and maybe there's tricks here or there, but at the Pareto frontier, a language that has more checks will be slower to compile than one that has fewer.

And that's not a bad thing or a deficit in Rust, it's just the nature of the beast.

ch4s3•35m ago
Yeah doing optimizations in a compiler on things like loops, addition, or string layouts is never free.
ModernMech•34m ago
And since you bring up Go and contrast the compile time with Rust, it's been experienced at Google (and also Volvo and other places) that Rust and Go teams are as productive whereas C++ is less than half as productive: https://www.youtube.com/watch?t=27012&v=6mZRWFQRvmw&feature=...

So the focus on Rust compile time is misplaced. It's not a big deal in terms of overall productivity.

gpm•14m ago
I don't think that follows - just that compile times aren't the only thing that matters. Maybe rust could be twice as productive as go if compile times went to zero for instance (or maybe not - just disputing that the evidence proves the claim here).
pornel•32m ago
Zero-cost abstractions aren't zero cost in compilation time. High-level abstractions translate to a lot of boilerplate that the compiler has to optimize out.

In unoptimized builds often the linker is the bottleneck. Rust/Cargo can parallelize most of the build, generating tons of code and debug info, but then the poor linker has to consume all of it at once. The object/exe formats were designed in ancient times, so they're hard to build incrementally or in parallel (some linkers are trying).

kreco•11m ago
Not sure why you are being downvoted here.
weinzierl•2m ago
I once heard (and don't know if it's still true) that the biggest compile-time sinks are macro expansion and codegen.

Both are kind of outside the Rust compiler's influence. Macros can be almost arbitrarily complex: you pay for what you order. Codegen is LLVM, and that's a fixed choice. You can use Cranelift to get around it, but then you pay elsewhere.

Regardless, it's nice to see performance improvements in the compiler, even if you have to cooperate to benefit from them (e.g. by keeping your macros light).

StreetComplete on iOS is now in public beta

https://github.com/streetcomplete/StreetComplete/issues/5421
221•Snowly•3h ago•51 comments

How to speed up the Rust compiler in September 2026

https://nnethercote.github.io/2026/09/30/how-to-speed-up-the-rust-compiler-in-september-2026.html
54•trickypr•1h ago•19 comments

GPT-Synopsys: Frontier Intelligence to Revolutionize Chip Design

https://news.synopsys.com/2026-09-30-OpenAI-and-Synopsys-Announce-GPT-Synopsys-Frontier-Intellige...
94•giuliomagnifico•3h ago•42 comments

Google breaks promise to provide 10 years of updates to Chromebooks

https://www.osnews.com/story/146052/google-breaks-promise-to-provide-10-years-of-updates-to-chrom...
133•speckx•1h ago•59 comments

OpenDLSS: A Vulkan Reimplementation of Nvidia's DLSS 5 Neural Rendering Network

https://github.com/maanHimself/OpenDLSS-NR
172•sagacity•1d ago•88 comments

Meta Uses A.I. Data Centers to Avoid Billions in Federal Taxes

https://www.nytimes.com/2026/09/30/technology/meta-ai-data-centers-taxes.html
63•gmays•1h ago•16 comments

Gemini 4 Argon

https://blog.google/innovation-and-ai/models-and-research/gemini-models/gemini-4-argon/
1516•bradleyg223•18h ago•1000 comments

FTC is investigating OpenAI, Anthropic and other AI companies over product risks

https://www.cnbc.com/2026/09/30/ftc-ai-probe-openai-anthropic.html
57•dgellow•1h ago•15 comments

Book of Shapes – Collection of minimal, generative and customizable SVG-patterns

https://bookofshapes.com/
159•eustoria•1d ago•10 comments

Micron CEO Says Memory Supply Will Be Much Tighter in 2027 and 2028 Than in 2026

https://www.techpowerup.com/353296/micron-ceo-says-memory-supply-will-be-much-tighter-in-2027-and...
92•speckx•1h ago•89 comments

The top secret URSALA, RAQUEL, and FARRAH satellites (2025)

https://www.thespacereview.com/article/4951/1
263•Bluestein•16h ago•126 comments

Adding Floating-Point Decimals for Fun and Profit

https://blog.vero.site/post/float
29•ibobev•2d ago•14 comments

Truemetrics (YC S23) Is Hiring a GTM Founder's Associate

https://www.ycombinator.com/companies/truemetrics/jobs/THLEzXI-gtm-founder-s-associate
1•truemetricsIngo•4h ago

Why the Bronze Age Collapsed

https://www.worksinprogress.news/p/why-really-caused-the-bronze-age
315•AnodicElegy•2d ago•204 comments

Before pixels: Modular industrial dashboards

https://unsung.aresluna.org/before-pixels-modular-industrial-dashboards/
222•leephillips•19h ago•41 comments

Returning from vacation? The government can search your phone without a warrant

https://arstechnica.com/tech-policy/2026/09/immigration-advocate-sues-border-agents-for-demanding...
179•rbanffy•3h ago•172 comments

Surprisingly complex waves reveal the brain's inner workings

https://www.quantamagazine.org/surprisingly-complex-waves-reveal-the-brains-inner-workings-20260930/
223•ibobev•19h ago•85 comments

A brief history of the Bloomberg terminal

https://spectrum.ieee.org/bloomberg-terminal
332•rbanffy•23h ago•143 comments

Launch HN: Magnitude (YC S25) – Self-optimizing inference engine for agents

https://github.com/magnitudedev/magnitude
178•anerli•20h ago•87 comments

Halfspace experimental IDE for solid modeling with distance fields

https://www.mattkeeter.com/projects/halfspace/
159•luu•18h ago•9 comments

Strutt's Powered Wheelchair Is Not a Wheelchair (For Legal Reasons)

https://www.core77.com/posts/145378
8•surprisetalk•1d ago•10 comments

5x faster Edge Functions: V8 isolates to Firecracker MicroVMs

https://www.netlify.com/blog/edge-functions-firecracker-microvms/
202•jbott•20h ago•87 comments

Show HN: Ledge.sh – Runnable Markdown Notes

https://ledge.sh
181•dancablam•1d ago•78 comments

The last time my family was replaced by technology

https://manuel.darcemont.fr/posts/the-last-time-my-family-was-replaced-by-technology/
291•megalomanu•1d ago•569 comments

CHOMPI portable sampler instrument is now open-source (hardware and software)

https://www.chompiclub.com/opensource
97•lashkari•20h ago•25 comments

What TLA+ can and can't check

https://buttondown.com/hillelwayne/archive/what-tla-can-and-cant-check/
212•b-man•1d ago•46 comments

LinkedIn Larpmaxxing

https://hereticpleb.vercel.app/blog/linkedin-larpmaxxing/
255•BurnerBurner•1d ago•211 comments

56k.rip – the 1996 dial-up internet experience

https://56k.rip/
226•adunk•16h ago•94 comments

Doing a Machine Learning PhD While Working in Japan

https://www.tokyodev.com/articles/doing-a-machine-learning-phd-while-working-in-japan
121•pwim•1d ago•40 comments

Responsible Release of AI-Generated Mathematics

https://agmai.org/general-sep29/
106•aureianimus•1d ago•152 comments