branch-prediction-and-speculation

Installation
SKILL.md

Branch Prediction and Speculation

Purpose

Explain how modern CPUs predict branches, execute speculatively, recover on mispredict, and why speculation created side channels (Spectre/Meltdown) — linking performance tuning with security-aware low-level coding.

When to Use

  • Hot loop branchy code underperforms expectations
  • Evaluating likely/unlikely or branchless refactors
  • Understanding kernel retpoline, IBRS, and similar mitigations
  • Secure coding around secret-dependent branches

Workflow

1. Branch predictor basics

Installs
44
GitHub Stars
135
First Seen
Jun 27, 2026
branch-prediction-and-speculation — mohitmishra786/low-level-dev-skills