Re:How Rust 1.26 more than tripled the speed of my code
by nonsince on Monday May 14, 2018 @10:33AM
(#17065862)
It's possible that `pushfq`+`popfq` get turned into a `mov` from the flag register into a the output register due to microcode-level optimisations.
[ Parent
| on HN ]
Re:How Rust 1.26 more than tripled the speed of my code
by pbsd on Monday May 14, 2018 @10:38AM
(#17065901)
That is not the case. On a Skylake chip, a pushfd + popfd roundtrip costs 24 cycles.
Re:How Rust 1.26 more than tripled the speed of my code
by feikname on Monday May 14, 2018 @11:43AM
(#17066427)
Just out of curiosity, how do you know this? Is it some kind of measurement you made yourself, written on Intel docs somewhere or something else?
I've been wondering about how much instructions cost lately and would like to be able to know this without the need of asking others.
Re:How Rust 1.26 more than tripled the speed of my code
by pbsd on Monday May 14, 2018 @11:52AM
(#17066510)
Agner's instruction listings [1] and InstLatX64 [2] are good sources for a variety of chips. The 24 cycle figure above can be seen at https://github.com/InstLatx64/InstLatx64/blob/ee13abcfb1e2bb...
Re:How Rust 1.26 more than tripled the speed of my code
by koverstreet on Monday May 14, 2018 @01:28PM
(#17067406)
There's also the intel optimization manuals.