3 ms·
Disclaimer: The title has been changed to "Rust std fs slower than Python!? No, it's hardware!" to avoid clickbait. However I'm not able to fix the title in HN.
by Pop_- 3y ago
Disclaimer: The title has been changed to "Rust std fs slower than Python!? No, it's hardware!" to avoid clickbait. However I'm not able to fix the title in HN.
- 3cats-in-a-coat 3y agoWhat's the TLDR on how... hardware performs differently on two software runtimes?
- lynndotpy 3y agoOne of the very first things in the article is a TLDR section that points you to the conclusion. > In conclusion, the issue isn't software-related. Python outperforms C/Rust due to an AMD CPU bug.
- j16sdiz 3y agoIt is software-related. Just the CPU perform badly on some software instruction.
- xuanwo 3y agoFSRM is a CPU feature embedded in the microcode (in this instance, amd-ucode) that software such as glibc cannot interact with. I refer to it as hardware because I consider microcode a part of the hardware.
- pornel 3y agoAMD's implementation of `rep movsb` instruction is surprisingly slow when addresses are page aligned. Python's allocator happens to add a 16-byte offset that avoids the hardware quirk/bug.
- sound1 3y agothank you, upvoted!
- sharperguy 3y ago"Works on contingency? No, money down!"
- deleted 3y ago[deleted]
- pvg 3y agoyou can mail hn@ycombinator.com and they can change it for you to whatever.