In-Order vs Out-of-Order Execution: Key Differences Explained
An in-order CPU issues and executes instructions in program order. When an earlier instruction waits, for example on a cache miss, the instructions behind it stop too. An out-of-order CPU checks dependencies, executes whichever instructions are ready first, and commits the results in program order through a reorder buffer (ROB). Because it can make progress on other instructions during waits, it achieves higher IPC, but it needs register renaming and instruction-selection logic, which increase circuit size and power.
| Aspect | In-order execution | Out-of-order execution |
|---|---|---|
| Order of issue and execution | Program order | Ready instructions are executed first, out of order |
| Committing results (retirement) | Program order | In program order, through the reorder buffer (ROB) |
| When an earlier instruction is waiting | Later instructions stop too (stall) | Independent later instructions proceed first |
| Handling data hazards | Forwarding and stalls. Instruction ordering is left to the compiler | Forwarding plus dynamic instruction scheduling in hardware |
| False dependencies (WAR, WAW) | Since order is preserved, they rarely cause problems | Removed by register renaming, which reassigns physical registers |
| Main additional circuitry | Little. A simple pipeline | Rename tables, physical registers, issue queues, the ROB, load/store queues |
| Impact of cache misses | Large. The pipeline tends to stall on every miss | Other instructions proceed within a window of hundreds of instructions, hiding part of the wait |
| IPC | Lower. Below out-of-order at the same issue width | High. Combined with a wide issue width, well above 1 |
| Circuit size and power | Small. Performance per area and per watt is easy to raise | Large. Instruction-selection logic and the ROB add area and power |
| Where it is used | Microcontrollers, small embedded cores, some cores that prioritize power saving, GPU compute cores | High-performance cores in PCs, servers and smartphones |
Figures are typical orders of magnitude and vary by process generation and product.