6 ms·
An example of what we are talking about is _mm_dp_ps (4-component dot product). It was heavily requested by game devs for SSE2 but didn't show up until 4.1.
by corysama 6y ago
An example of what we are talking about is _mm_dp_ps (4-component dot product). It was heavily requested by game devs for SSE2 but didn't show up until 4.1. And, even then it wasn't much better than hand-rolling it with old instructions.
The hardware engineers were "correct". It's a difficult instruction to make fast compared to completely independent mul-adds. Game devs "should just" re-architect their code to not deal with small situations individually and instead be more bulk-data-processing like SPECfp because that's what's friendly to the hardware. But, that's dismissing how the software actually worked --especially back then.
16 years later, many, but far from all of AAA game engines more closely resemble SPECfp. But, all along the way, and in tons of 3D graphics and gameplay code still today, it would have been nice to reliably have one of the most common and fundamental operations in games well-baked into the chips.