Speculative execution

from Wikipedia, the free encyclopedia

In a Speculative execution (English for, speculative execution ') are idle processor - resources used for a potential future state of the program flow requires performing calculations and stand ready to results.


Speculative execution is an implementation of the evaluation strategy eager execution (dt. Eager evaluation), the opposite of the lazy evaluation (dt. About evaluation as required), on processor level. This enables the processor to continuously execute several commands in parallel in order to work more effectively and quickly. This was also introduced in order to utilize the increasing number of available processor resources (several pipelines , etc.) more effectively in parallel.


In speculative execution , the following program steps (in the program flow future) are examined for their executability in phases in which the processor is not fully utilized with the aim of finding the most likely path of the program flow. The most likely execution path is followed and the results are cached as "speculative results". When the program arrives at the point where it needs the results, they are already available and there is no need to wait for a possibly lengthy calculation. The cached results are read out and the appropriate one is carried out, the others are discarded. This "look ahead" of the processor means that its performance is also used in phases of lower utilization in order to relieve it later when it is high.


A disadvantage of this technique is that calculations on execution paths that turn out to be incorrect speculation are also included in the energy balance. These calculations do not contribute to the computing power and thus reduce the computing power efficiency per watt . For mobile computing systems such as laptops , this can be relevant for the autonomous operating time, which is why the Intel Atom processor , for example, was deliberately developed without this technology.

See also


  • David Kaeli, Pen-Chung Yew, Speculative Execution in High Performance Computer Architectures , ISBN 1420035150
  • Thomas J. Watson IBM Research Center: Prabhakar Raghavan, Hadas Schachnai, Dynamic Schemes for Speculative Execution of Code