News for hackers. Stuff that matters.
Re:Do Not Taunt Happy Fun Branch Predictor by mumumu on Wednesday January 25, 2023 @10:12PM (#34527290)
*avoid branches

The blog post I mentioned:

Paper: Parsing Gigabytes of JSON per Second https://branchfree.org/2019/02/25/paper-parsing-gigabytes-of...

Another related post from Lemire:

Ridiculously fast unicode (UTF-8) validation https://lemire.me/blog/2020/10/20/ridiculously-fast-unicode-...

Those algorithms are fast. But to put them in perspective. A single x86 CPU can write 64B per cycle. At 5GHz, the theorical maximum bandwidth is 320 GBps. IIRC, the read bandwidth is twice that.

There are others botlenecks, and is very hard to write code that writes at every cycle.

A interesting consequence, is that the theorical maximum bandwidth is logarithmical to the number of cycles. Again, talking about branchless streaming application.

There are no comments on this comment yet.