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 2019

38 pointsby nnethercoteover 5 years ago

1 comment

wyldfireover 5 years ago
&gt; But I was able to work around this by using a trick: creating two variants of the function, one marked with #[inline(always)] (for the hot call sites) and one marked with #[inline(never)] (for the cold call sites).<p>Can&#x27;t PGO make inlining decisions like this? Otherwise, propeller&#x2F;LTO might work well.<p>&gt; But there’s a trade-off. Sometimes a simpler, smaller function is slower.<p>Without a doubt! Imagine the naive&#x2F;simple&#x2F;portable memcpy versus a target-aware one that capitalizes on wider or aligned loads and stores.