4 ms·
I don't understand why you felt the need to point this out when the linked article explicitly mentioned it. > Important note: Miri is not intended to accuratel
by ttfkam 4y ago
I don't understand why you felt the need to point this out when the linked article explicitly mentioned it.
> Important note: Miri is not intended to accurately replicate optimized Rust runtime code. Optimizing for Miri can sometimes make your real code slower, and vice versa. It’s a helpful tool to guide your optimization, but you should always benchmark your changes with release builds, not with Miri.
- IshKebab 4y agoI think they undersell the difference. You'd be laughed out of the room if you profiled debug code.
- Tobu 4y agoThe author was gently panned when this was originally posted on Reddit, and they added that note, but now that the article is being reposted uncritically where people may not know the difference, it's worth pointing out again. The way the author got a profile out of Miri is creative, but Miri was never a helpful guide for profiling, it seems that the second benchmark they used for confirmation was also unoptimised (run without --release which is a rookie mistake). Then they got wrong conclusions from flawed observations about the costs of abstractions like range.contains.