TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

The Rust compiler is still getting faster

324 点作者 nnethercote将近 6 年前

6 条评论

fluffything将近 6 年前
The rust compiler now has features that few or none C and C++ compilers have: incremental compilation within a single translation unit, pipelined compilation, multi-threaded and lazy query-based compilation, ...<p>Implementing each of these features have required whole program refactorings in a large-scale codebase performed by few individuals while hundreds of other developers where simultaneously evolving the software and implementing new features.<p>Having been a C++ programmer for over 10 years, none of these refactorings would have payed off in C++ because of how time consuming it would have been to track all bugs introduced by them.<p>Yet they do pay off in Rust because of my favourite Rust feature: the ability to refactor large-scale software without breaking anything: if a non-functional change compiles, &quot;it works&quot; for some definition of &quot;works&quot; that&#x27;s much better than what most other languages give you (no memory unsafety, no data-races, no segfaults...).<p>Very few programming languages have this feature, and no low-level programming language except for Rust has it.<p>Software design is not an upfront-only task, and Rust let&#x27;s you iterate on software design as you better understand the problem domain or the constraints and requirements change without having to rewrite things from scratch.
评论 #20523819 未加载
评论 #20526163 未加载
评论 #20525467 未加载
评论 #20523955 未加载
评论 #20534899 未加载
sddfd将近 6 年前
This is great! Many dev hours are spend waiting for the compiler, every second counts!<p>The second order effects are even worse. After a minute, the programmer will start thinking about other things, running flow.<p>If compiles regularly take 5min, devs will leave their desks (and honestly, who can blame them for it).
评论 #20523542 未加载
评论 #20526968 未加载
评论 #20523986 未加载
评论 #20523499 未加载
pornel将近 6 年前
Faster compiler is nice, but you know what&#x27;s faster? Not having to compile anything. I&#x27;m also looking forward to crates.io serving precompiled crates (<a href="https:&#x2F;&#x2F;www.ncameron.org&#x2F;blog&#x2F;cargo-in-2019&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.ncameron.org&#x2F;blog&#x2F;cargo-in-2019&#x2F;</a>)
评论 #20524560 未加载
评论 #20524079 未加载
评论 #20525173 未加载
评论 #20524255 未加载
howenterprisey将近 6 年前
Does LLVM still take up much of the overall time spent by the Rust compiler? I was thinking of getting involved over there as the most effective way to make speed-ups happen.
评论 #20523824 未加载
评论 #20524347 未加载
评论 #20524993 未加载
评论 #20523822 未加载
pmoriarty将近 6 年前
I wish compiling the Rust compiler itself was faster. It literally takes days to compile on my old laptop.
评论 #20526729 未加载
评论 #20527380 未加载
评论 #20528516 未加载
johnklos将近 6 年前
Maybe they should make compiling the Rust compiler faster. Right now it takes longer and uses more CPU and memory than compiling a whole LLVM toolchain, then using that toolchain to compile a whole kernel and OS.
评论 #20526445 未加载