IT lexicon › Programming › Execution Order

Execution Order

Programming På svenska → Updated: 2026-11-16

The sequence in which a CPU actually executes instructions, which may differ from the order in source code.

Modern CPUs execute instructions out of order to hide latency — a cache miss might stall while later instructions proceed. The result is correct as long as single-threaded observable behavior is preserved. In multithreaded contexts, memory fences restrict this reordering to ensure other threads see the correct sequence.

← Back to the lexicon