[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Devel] Question about optimizing FT_MulFix.
From: |
Nathan Hurst |
Subject: |
Re: [Devel] Question about optimizing FT_MulFix. |
Date: |
Tue, 1 May 2001 00:38:13 +1000 (EST) |
On Mon, 30 Apr 2001, David Turner wrote:
> "mult_fix2" corresponds to the original code in FT_MulFix, and it's
> interesting to see that it's the fastest on a "modern" processor
> like a PIII. I'd like to see the results for a PowerPC or an Alpha
> though, just to get sure of what's hapenning..
>
> Apparently, it seems that "mult_fix3" is a winner, because it
> povides a 12-15% speedup on "old" processors, whild loses less
> than 1% of performance compared to the original FT_MulFix on
> a Pentium III..
>
> I'd like to have more data however to be certain about that..
> Testers are then welcome :-)
On a 400MHz G4:
address@hidden:~/timecpu$ gcc fixmul64.c test_fixmul.c
address@hidden:~/timecpu$ ./a.out
mult_fix1 : time = 14.07000
mult_fix2 : time = 13.46000
mult_fix3 : time = 13.06000
mult_fix4 : time = 14.87000
mult_fix5 : time = 19.28000
address@hidden:~/timecpu$ gcc -O6 fixmul64.c test_fixmul.c
address@hidden:~/timecpu$ ./a.out
mult_fix1 : time = 6.63000
mult_fix2 : time = 5.43000
mult_fix3 : time = 6.22000
mult_fix4 : time = 7.44000
mult_fix5 : time = 6.42000
address@hidden:~/timecpu$ cat /proc/cpuinfo
cpu : 7400 (G4)
clock : 400MHz
bogomips : 796.76
L2 cache : 1024K unified
memory : 128MB
On a 400MHz G3:
bash-2.05$ gcc fixmul64.c test_fixmul.c
bash-2.05$ ./a.out
mult_fix1 : time = 13.97000
mult_fix2 : time = 12.70000
mult_fix3 : time = 12.38000
mult_fix4 : time = 14.52000
mult_fix5 : time = 17.99000
bash-2.05$ gcc -O6 fixmul64.c test_fixmul.c
bash-2.05$ ./a.out
mult_fix1 : time = 6.65000
mult_fix2 : time = 5.44000
mult_fix3 : time = 6.25000
mult_fix4 : time = 7.45000
mult_fix5 : time = 6.45000
bash-2.05$ cat /proc/cpuinfo
cpu : 740/750
clock : 400MHz
bogomips : 798.40
L2 cache : 1024K unified
memory : 256MB
Dual G4 400MHz:
address@hidden:~/timecpu$ gcc fixmul64.c test_fixmul.c
address@hidden:~/timecpu$ ./a.out
mult_fix1 : time = 12.32000
mult_fix2 : time = 11.42000
mult_fix3 : time = 11.10000
mult_fix4 : time = 12.84000
mult_fix5 : time = 17.12000
address@hidden:~/timecpu$ gcc -O6 fixmul64.c test_fixmul.c
address@hidden:~/timecpu$ ./a.out
mult_fix1 : time = 5.93000
mult_fix2 : time = 4.83000
mult_fix3 : time = 5.55000
mult_fix4 : time = 6.65000
mult_fix5 : time = 5.83000
Which just proves that benchmarks are meaningless.
njh