Re:Primeval C: two very early compilers
by 1337p337 on Saturday March 02, 2013 @05:17PM
(#5311328)
The situation with x86 specifically is a little weirder than that: http://www.emulators.com/docs/nx06_rmw.htm . It's a bit of a long read, but the summary is that on some x86s, single-instruction adds to memory are faster, and on others, load/increment/store in three instructions is faster.
Compiler optimization be a harsh mistress.