Out-of-order execution
When a CPU runs instructions in a different order than the program was written, to avoid waiting. While one instruction waits for data from memory, the CPU runs ahead on later, independent instructions — then presents the results in the right order externally.
Problem: an in-order CPU stalls completely when an instruction waits (e.g. a cache miss). Out-of-order (OoO) looks in a window of upcoming instructions, finds ones that don't depend on what's waiting, and runs them now. A "reorder buffer" ensures the results are retired (made visible) in program order, so correctness is preserved. Classic technique: Tomasulo's algorithm, register renaming to break false dependencies. Win: keeps the execution units busy → a big performance gain. Cost: complex, power-hungry logic (simple efficient cores and some microcontrollers are in-order). Related to speculative execution and superscalar design.