Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22042

with the -Ofast flag on gcc does breaking down a math expression (multiply and add) affect speed?

$
0
0

i want to know with -Ofast flag on gcc if

x += (a * b) + (c * d) + (e * f);

is faster/slower/the same as/than

x += a * b;x += b * c;  x += e * f;

I have a math expression like this inside of a nested loop so any gain in speed might have a significant effect.


Viewing all articles
Browse latest Browse all 22042

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>