On Wed, Oct 22, 2003 at 07:08:39AM +0800, William Kenworthy wrote:
> On all the machines (athlon t-bird, p4) I have tried so far, -O3
> always decreases performance - O2 is best (dramatically so on
> something like a

Indeed, in this case, O2 is faster than O3.  I assumed Debian's gcc
package was compiled with O2, so I just re-merged my gentoo gcc using
O2.  I recompiled my program, and now it is back to its better running
time (two or three seconds to load all the records in memory).

It would be interesting to actually develop a whole suite of tests to
see when O3 is faster (if ever) and when O2 is faster.  Based on this
one (completely un-scientific :) test, I'd have to say that the C++
standard library is best compiled with O2.

For what it's worth, I did some benchmarking on my new drive as well,
and it's performing as good or better than the old drive.

Thanks for all the feedback!  If anyone else happens to do similar
testing or benchmarking of compiler optimizations, I'd be interested in
reading about them.

Thanks again,
Matt



--
[EMAIL PROTECTED] mailing list

Reply via email to