Overview

Speculative execution is often used in conjunction with branch prediction. The CPU executes instructions along a predicted path before it is certain that the path will actually be taken. If the prediction is correct, the results are committed; if not, they are discarded.

Security Implications

While highly effective for performance, speculative execution has been the source of major security vulnerabilities like Spectre and Meltdown, where side-channel attacks can leak sensitive data from the speculative state.

Use Cases

  • Branch prediction.
  • Eager execution of instructions before their dependencies are fully resolved.

Related Terms