4 ms·
Even at the time, this was no longer really applicable on Sandy Bridge and beyond. The point of their volatile macros was just to prevent reordering. It can mat
by boulos 4y ago
Even at the time, this was no longer really applicable on Sandy Bridge and beyond. The point of their volatile macros was just to prevent reordering. It can matter, but it's pretty rare.
From the last paragraph before the Conclusion:
> On the Nehalem there is a significant performance differ- ence between the two implementations on both compilers. Even though both implementations have the same instruc- tion order, the compiler reorders the intrinsic implementa- tion, but does so sub-optimally. On the Sandy Bridge the performance difference is slight. We examined the assem- bly code generated by both the icc and gcc and in the two cases ordering of the instructions are not the same as the initial ordering, so the intrinsics do not maintain the order- ing. In the previous experiment (Figure 12) the ordering was not close enough to an optimal one and from the compiler scheduled implementation the compiler did not achieve the same performance as the expert. We suspect that because of its large reorder windows, the Sandy Bridge is less sensitive to the instruction order than the Nehalem.