Slow "=" operation problem
Ian Lance Taylor
ian@airs.com
Thu Jan 27 02:29:00 GMT 2005
Gang Chen <gchen@IfA.Hawaii.Edu> writes:
> It looks that the storing part ("=" operation) takes much longer time than
> the multiplying part ("*" operation). You can see this from the running
> time with the propram only has "line 1", "line 2", or "line 3". The
> corresponding time is attached at the end of every line.
If you are compiling with optimization, then your numbers are
deceptive. When you compile the loop with only the multiplication,
the compiler will see that the result of the multiplication is not
used (it is not stored anywhere), and the entire multiplication will
be removed.
Ian
More information about the Gcc-help
mailing list