TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

How to speed up the Rust compiler some more in 2018

183 pointsby nnethercotealmost 7 years ago

3 comments

breakingcupsalmost 7 years ago
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 未加载
cesarbalmost 7 years ago
&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 未加载
johnparkar7777almost 7 years ago
Informative link