A performance trap: when store forwarding fails
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
Daniel Lemire's post explains store forwarding, the processor mechanism that lets a load read bytes from a pending store in the store buffer. Forwarding fails when a load is wider than the store or only partly overlaps it, forcing the load to wait for the store to reach cache.