15 January 2007
Lampson: Lazy and Speculative Execution
7
Reordering and Conditionals
nLazy
nt:=L; !A; !B(t) Þ !A; !B(L) latency only
nt:=L; !A; x → !B(t) Þ !A; x → !B(L) less work if ~x
nt:=L; !A; x → !B(t) Þ t:=L1; !A; x → !B(L2(t)) more general
n
nSpeculative
n !A; x → !B(S) Þ t:=S; !A; x → !B(t)
n !A; x → !B(S) Þ t:=S1; !A; x → !B(S2(t)) more general
n
n You bet on the outcome of the conditional
o! marks actions that have output/side effects