Richard B. Johnson wrote: > On Mon, 3 Feb 2003, Martin J. Bligh wrote: > >>People keep extolling the virtues of gcc 3.2 to me, which I'm >>reluctant to switch to, since it compiles so much slower. But >>it supposedly generates better code, so I thought I'd compile >>the kernel with both and compare the results. This is gcc 2.95 >>and 3.2.1 from debian unstable on a 16-way NUMA-Q. The kernbench >>tests still use 2.95 for the compile-time stuff. >> > > [SNIPPED tests...] > > Don't let this get out, but egcs-2.91.66 compiled FFT code > works about 50 percent of the speed of whatever M$ uses for > Visual C++ Version 6.0 Interesting. I just noticed that I get 50% decrease in the speed of my program if I just insert a printf(). I.E. my program is like: printf() for(;;) { do_sorting_loop_test(); } If I remove the initial printf it doubles in speed? I assume this is some weird caching thing? gcc is 3.2.1 (same happens for 2.95..) Note this is with -O3. If I don't specify -O then leaving the printf in speeds things up by about 15% attached is the assembly for the slow and fast in case anyone's interested. Pádraig.