Why my Rust benchmarks were wrong, or how to use std::hint::black_box? (2022) (gendignoux.com) 20 points by aw1621107 5mo ago ↗ HN
[–] aw1621107 5mo ago ↗ Full title is "Why my Rust benchmarks were wrong, or how to [correctly] use std::hint::black_box?", but I had to remove something to get the title to fit.
[–] bayesnet 5mo ago ↗ > I have no idea what the mov rcx, rsp instruction is for. The rcx register is not read anywhere after that.Anyone have any ideas? I’m surprised that the compiler emits a “useless” instruction at -o3.
2 comments
[ 2.9 ms ] story [ 12.7 ms ] threadAnyone have any ideas? I’m surprised that the compiler emits a “useless” instruction at -o3.