Re: Strange optimization results

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jonathan Wakely <jwakely.gcc@xxxxxxxxx> writes:
> Did you run the tests more than once and average the results? Your
> test code has no timing measurements in it, what are you measuring?
> The entire time for the executable to run?  That includes time for the
> OS to create and run a new process, and will depend how busy the
> system is, so could have very little to do with the code in the
> executable.

Yes, I run tests 3 times and this is average results. I used time
utility. Time for create and run this program without loop is 0.002s,
so this time is not significant. System busy was little and the same
in all tests.

Brian Budge <brian.budge@xxxxxxxxx> writes:
> I would also add, having made many similar benchmarks with gcc, that
> this test is probably too trivial for meaningful results.  I wouldn't
> be surprised at all if with any level of optimization, the compiler
> can determine that the loop doesn't actually even have to be run more
> than once, since the result is the same every time through.

I have checked this. Time of each test linearly depends on count of iterations.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux