IT lexicon › Programming › Store forwarding

Store forwarding

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

A processor circuit optimization that lets a load immediately see a recent store without waiting for cache propagation.

Modern processors pipeline instructions aggressively. A classic pitfall emerges when you write to address X then immediately read from X—normally the read would block waiting for the write to hit cache. Store forwarding short-circuits this: the processor feeds the value directly from the store buffer to the load, saving cycles. This happens internally on a single processor and is transparent to the programmer.

Store forwarding can surprise you in weak-ordering contexts. If a store is buffered but not yet visible to other processors, another thread may read a stale value. Explicit memory barriers force the buffer to drain before further instructions execute.

← Back to the lexicon