Ask HN: What was the first CPU to implement speculative execution?
Hi all,
Does anyone know what the first cpu design to support speculative execution was? Everything I can find on the subject mentions that speculative execution is essential for modern designs, but none mention where the idea comes from.
3 comments
[ 97.0 ms ] story [ 133 ms ] threadIf you define it broadly as any form of computation before you know for sure you will need to perform the computation, then items such as Tomasulo’s algorithm from January 1967 can be seen as a form of speculative execution (https://en.wikipedia.org/wiki/Tomasulo_algorithm). It was implimented in the IBM 360/91 mainframe.
If instead you define "speculative execution" as needing some form of branch prediction and execution of a predicted branch path then the Wikipedia article on branch prediction (https://en.wikipedia.org/wiki/Branch_predictor) cites a publication by Yeh & Patt (item 14 in the citations list) dated from 1991. There are likely earlier pubs, but that one provides a 27 year old age for the technique. The reason that this places a age on the technique is that the moment you begin 'predicting' a branch and executing instructions down the 'predicted' path before you know for sure the branch outcome, you are "speculatively executing" instructions (executing them before you know for sure you do in fact need to execute them).