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

Re: P4 optimized Debian GNU/Linux?



On Fri, Feb 27, 2004 at 08:40:28AM +0000, Adam Majer wrote:
> start_time = time();
> for( int i=0; i<10000000; i++ ) // I forget how many 0 I had exactly
>    sin ( i / 324.34444 );
> end_time = time();
> printf( "Diff: %d\n", end_time - start_time );
> 
> When I run the program with no optimization -O0, I got some numbers that 
> looked about the same for both machines. Then I compiled with 
> -march=pentium-4 and -march=athlon-xp and -O6, and surprise, surprise, 
> the P4 had a speed *decrease*!! It slowed down from something like 23 

I did enough performance work at Microsoft to know that your test is 
meaningless.  Just because you know X at level Y doesn't imply a thing 
about your knowledge at level 10Y, good or bad.  The program might get 
slower, or faster, or crash.

Some people call this "nonlinear."  A perf expert described it to me as 
more accurately: stochastic.

So you can draw no conclusions whatsoever from your test.



Reply to: