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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

How to speed up the Rust compiler some more in 2018

183 点作者 nnethercote将近 7 年前

3 条评论

breakingcups将近 7 年前
I liked this post, not only for showing an overview of all the big and small wins but also for showing approaches that were tried and didn&#x27;t work out.<p>It&#x27;s nice to see someone write about failures in a very neutral and informative way, as it is a daily part of our jobs and life but most of what you read online is (logically) about successes.
评论 #17236465 未加载
评论 #17239770 未加载
cesarb将近 7 年前
&gt; Cachegrind’s output showed that the trivial methods for the simple BytePos and CharPos types in the parser are (a) extremely hot and (b) not being inlined.<p>To me, this points to a deficiency in the rustc compiler. All trivial methods (trivial in that they will always be cheaper than a function call) should be automatically treated by the compiler as if they had been marked #[inline]. Currently a rust programmer has to annotate every single trivial getter and setter with that attribute, which is both tiresome and easy to forget.
评论 #17238809 未加载
评论 #17239024 未加载
评论 #17237479 未加载
johnparkar7777将近 7 年前
Informative link