17 ms·
Yeah, but the main reason the RMW is better (in a tight loop like this) is because of the available fusion for the load-op part of the RMW. So it is about micr
by BeeOnRope 9y ago
Yeah, but the main reason the RMW is better (in a tight loop like this) is because of the available fusion for the load-op part of the RMW.
So it is about micro-fusion in that way.
The confusing part is that he mentions a performance different up front, so you'd expect this to be about how the micro-fused version was faster: but that difference was actually because of alignment probably causing a lack of macro-fusion in some cases (or some other alignment effect). The two versions have different alignment, but it's basically just a fluke which one happens to be faster, it could have been the other way around with some unrelated changes to other code that shifted the alignment.