afaict there were a whole bunch of changes between nbody-5.bench and nbody-6.bench not just sqrt.
If you're talking about this:
At face value, this should make the program twice as fast, because AVX instructions can chew on four f64s at a time instead of SSE's two. But, on my Skylake-based machine at least, the AVX version becomes slower.
:then afaict the faster program is the "outdated CPU" program that uses SSE ?
No, in fact the previous paragraph would be more relevant:
(You could make it faster, but non-portable, by re-introducing the reciprocal square root trick.)
Which is odd because I totally remembered the article replacing the reciprocal sqrt optimization and finding it faster. (Also a bit ironic that the article says to measure yet doesn't in that particular case).
1
u/igouy Jan 27 '20
afaict there were a whole bunch of changes between
nbody-5.benchandnbody-6.benchnot justsqrt.If you're talking about this:
:then afaict the faster program is the "outdated CPU" program that uses SSE ?