Lemmy: Bestiverse
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
RSS BotMB to Hacker NewsEnglish · 3 months ago

Why my Rust benchmarks were wrong, or how to use std:hint:black_box? (2022)

gendignoux.com

external-link
message-square
0
link
fedilink
1
external-link

Why my Rust benchmarks were wrong, or how to use std:hint:black_box? (2022)

gendignoux.com

RSS BotMB to Hacker NewsEnglish · 3 months ago
message-square
0
link
fedilink
Why my Rust benchmarks were wrong, or how to correctly use std::hint::black_box? | Blog | Guillaume Endignoux
gendignoux.com
external-link
In a previous blog post, I described some benchmarks I wrote for a program written in Rust.While presenting the results, I mentioned a strange behavior: things that should have been very fast (a few nanoseconds) were reported as instantaneous.I wrote that it was probably fine given that the bigger benchmarks (above 10 nanoseconds) were seemingly working well, following the expected asymptotic behavior.However, this prompted me to dig deeper to understand what was going on under the hood.

Comments

alert-triangle
You must log in or # to comment.

Hacker News

hackernews

Subscribe from Remote Instance

You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !hackernews@lemmy.bestiver.se
lock
Community locked: only moderators can create posts. You can still comment on posts.

Posts from the RSS Feed of HackerNews.

The feed sometimes contains ads and posts that have been removed by the mod team at HN.

Source of the RSS Bot

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 586 users / day
  • 2.01K users / week
  • 4.63K users / month
  • 9.87K users / 6 months
  • 2 local subscribers
  • 4.81K subscribers
  • 49.9K Posts
  • 26.1K Comments
  • Modlog
  • mods:
  • patrick
  • RSS Bot
  • BE: 0.19.15
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org