🚫 403 Forbidden: The ultimate plot twist! Turns out your #CPU can't predict branches when it's locked out of the page. Who knew running into a digital "no entry" sign could be so educational? 🔒🤷‍♂️
https://lemire.me/blog/2026/03/18/how-many-branches-can-your-cpu-predict/ #403Forbidden #BranchPrediction #DigitalEducation #TechTwist #NoEntry #HackerNews #ngated
How many branches can your CPU predict?

Modern processors have the ability to execute many instructions per cycle, on a single core. To be able to execute many instructions per cycle in practice, processors predict branches. I have made the point over the years that modern CPUs have an incredible ability to predict branches. It makes benchmarking difficult because if you test … Continue reading How many branches can your CPU predict?

Daniel Lemire's blog

“Lock-free” and “branch-less” #programming are fascinating topics:

“The Weird Concept Of ‘Branchless Programming’”, ‘Sanix’ (https://sanixdk.xyz/blogs/the-weird-concept-of-branchless-programming).

Via HN: https://news.ycombinator.com/item?id=45405750

#Optimization #Speed #Efficiency #BranchlessProgramming #Hardware #CPU #BranchPrediction

THE WEIRD CONCEPT OF BRANCHLESS PROGRAMMING

AMD Returns To 1996 With Zen 5’s Two-Block Ahead Branch Predictor

An interesting finding in fields like computer science is that much of what is advertised as new and innovative was actually pilfered from old research papers submitted to ACM and others. Which is …

Hackaday
postrisc2

Branch prediction

Nice:

“Branch Predictor: How Many ‘If’s Are Too Many? Including x86 And M1 Benchmarks!”, Cloudflare (https://blog.cloudflare.com/branch-predictor/).

Via HN: https://news.ycombinator.com/item?id=27062650

#CPU #Hardware #Optimization #Performance #BranchPrediction #SpeculativeExecution #Intel #AMD #ARM #Pipeline

Branch predictor: How many "if"s are too many? Including x86 and M1 benchmarks!

Is it ok to have if clauses that will basically never be run? Surely, there must be some performance cost to that...

The Cloudflare Blog
As predicted, more branch prediction processor attacks are discovered:

"Researchers from the College of William and Mary, Carnegie Mellon, the University of California Riverside, and Binghamton University have described a security attack that uses the speculative execution features of modern processors to leak sensitive information and undermine the security boundaries that operating systems and software erect to protect important data.

That probably sounds familiar."

https://quitter.no/url/1702276

#security #computers #cpu #branchprediction
As predicted, more branch prediction processor attacks are discovered

New attack focuses on a different part of the branch prediction system.