Computing Atlas

How Computing Was Built
Sign In
Text size
100%
Theme
Algorithm

Speculative execution

Algorithm Classification

Speculative execution is a processor design technique in which a processor does work before it knows whether that work is needed. The processor guesses what will be wanted next, computes it early, and then either keeps the results or throws them away once the real need is known. The aim is to give a program more concurrency when spare execution resources exist, and the benefit is limited by how accurate the guessing turns out to be. It is most familiar from superscalar central processors, where it is usually paired with branch prediction so that instructions after a conditional branch can start before the branch is resolved. The same idea appears in value prediction, prefetching of memory and files, and optimistic concurrency control in database systems. Variants include eager execution, which runs both sides of a branch and commits only the correct one, and predictive execution, which follows a single guessed path and unrolls the work after a misprediction. Since 2017 a family of security vulnerabilities, including Spectre and Meltdown, has been traced to speculative execution in common processors.

Connections

In Field

Source Speculative execution (Wikipedia)
Sources
Speculative execution (Wikipedia)
  • In Group: Programming Patterns and Approaches, Lead
    as an optimization technique to increase its performance
  • In Field: Computer Architecture, Lead
    In computer science and processor design, speculative execution or speculation is a design characteristic
View the Source
Comments (0)
No comments yet. Be the first to share a thought.
Reader Challenges (0)
No disputes yet. Spotted an error or a better source? Open the first one.