ELI5: Explain Like I'm 5

Out-of-order execution

Imagine you are playing with blocks and your mom asks you to put them in order from big to small. You start with the biggest block and then search for the next block that is smaller than the one you are holding. But then, suddenly, you find a block that is even smaller than the one you were going to pick up next.

Now, your options are to either put the smaller block in place of the next one, or hold onto it and continue searching for the right block.

This is similar to what happens in out-of-order execution in a computer. When a program needs to be executed, the computer searches for the next set of instructions to execute in order. However, sometimes certain instructions take longer to execute, and the computer might find other instructions that are quicker to execute and can be executed right away.

Just like you could choose to hold onto the smaller block and continue searching for the right one, the computer will hold onto the instructions that can't be executed yet and continue searching for the ones that can.

When it finds the right instruction, it will go back and execute the ones that were held onto before. This way the computer can do multiple things at once and be more efficient.
Related topics others have asked about: