Latest Tech News

Stay updated with the latest in technology, AI, cybersecurity, and more

Filtered by: branch Clear Filter

Understand CPU Branch Instructions Better

Branch instructions are the primary means by which a program running on a CPU makes a decision. This post is part of a series of posts on CPU performance, as part of the Pointer Wars: Linked List Edition challenge. This challenge is great for undergraduates, graduate students, and new engineers who want feedback about writing high performance C or C++ code. Much more info here. The Sequential Execution Model and Branch Instructions Programs written to execute on a CPU follow something called

The ITTAGE indirect branch predictor

While investigating the performance of the new Python 3.14 tail-calling interpreter, I learned (via this very informative comment from Sam Gross) new (to me) piece of performance trivia: Modern CPUs mostly no longer struggle to predict the bytecode-dispatch indirect jump inside a “conventional” bytecode interpreter loop. In steady-state, assuming the bytecode itself is reasonable stable, modern CPUs achieve very high accuracy predicting the dispatch, even for “vanilla” while / switch -style inte