lkml.org 
[lkml]   [2007]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: kernel + gcc 4.1 = several problems
Date
Hello, 

> Here's an example program that you can test and time yourself.
>
> On my Core 2, I get
>
> [torvalds@woody ~]$ gcc -DCMOV -Wall -O2 t.c
> [torvalds@woody ~]$ time ./a.out
> 600000000
>
> real 0m0.194s
> user 0m0.192s
> sys 0m0.000s
>
> [torvalds@woody ~]$ gcc -Wall -O2 t.c
> [torvalds@woody ~]$ time ./a.out
> 600000000
>
> real 0m0.167s
> user 0m0.168s
> sys 0m0.000s

Test was done on my laptop with gcc 4.1.1 and CPU:

processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Pentium(R) 4 CPU 2.40GHz
stepping : 9
cpu MHz : 2392.349
cache size : 512 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe cid xtpr
bogomips : 4786.36
clflush size : 64

I wrote a simple script that run each version of your code 100
times measuring the execution time. Then some simple gnuplot
magic was applied. The result is attached (png file).

- cmovne was faster with almost stable execution time (~171ms)
- je-mov was slower and execution time varies

Interpretation is up to you ;-)

--
Regards,

Mariusz Kozlowski
[unhandled content-type:image/png]
\
 
 \ /
  Last update: 2007-01-03 18:55    [W:1.576 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site