I was wondering, can I sum, or multiply, two float32 variables?
Is it worth doing all sums and multiplications that happens very much (e.g. in videogames while calculating simple bullet trajectories) in SSE registers?
The whole point of SSE is indeed to process a lot of numbers quickly. And the ability to process two numbers at a time helps a lot with that. For instance, you can indeed add a step {dx, dy}
to a coordinate {x, y}
in a single instruction (ADDPS
). It could in fact add 4 floats, since the registers are 128 bits, but that might be unnecessary for your case. ADDPD
splits the 128 bits in 2x64 so it adds two doubles. ("float64")
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments