Show HN: How do you reliably benchmark sub-100ns code paths in Rust

1 pointsposted a day ago
by yousef06

1 Comments

verdverm

a day ago

Not sure about Rust, I assume it's going to be the same, my PhD advisor gave me an inline C assembly snippet I could use to do cycle accurate benchmarking.

It used counters on the CPU, something super basic like reading those registers into a var.

---

You can probably take the above to a coding agent or LLM and get what you need back.