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.

Towards Understanding the Runtime Performance of Rust

4 pointsby Sindisilabout 1 year ago

1 comment

steveklabnikabout 1 year ago
I took a look at the code for the benchmarks: the first three I opened up are full of direct array accesses. It&#x27;s very much &quot;C code written in Rust.&quot;<p>What&#x27;s more perplexing is they&#x27;re aware of iterators: they use them in the setup code all the time!<p>Apparently this was intentional:<p>&gt; We manually inspected the code of each program and ensured that the two versions (i) implement the same algorithm, (ii) follow the same structure (e.g., both use for loops), (iii) use similar data when possible, and (iv) involve no library functions and system calls. We envision that, this way, the implementation differences are reasonably minimized.<p>This doesn&#x27;t mean this analysis is inherently bad, but it does mean that it&#x27;s not necessarily representative of actual Rust programs, which is the Achilles heel of any microbenchmark comparison