lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200701031853.36145.m.kozlowski@tuxland.pl>
Date:	Wed, 3 Jan 2007 18:53:35 +0100
From:	Mariusz Kozlowski <m.kozlowski@...land.pl>
To:	Linus Torvalds <torvalds@...l.org>
Cc:	Grzegorz Kulewski <kangur@...com.net>,
	Alan <alan@...rguk.ukuu.org.uk>,
	Mikael Pettersson <mikpe@...uu.se>, s0348365@....ed.ac.uk,
	76306.1226@...puserve.com, akpm@...l.org, bunk@...sta.de,
	greg@...ah.com, linux-kernel@...r.kernel.org,
	yanmin_zhang@...ux.intel.com
Subject: Re: kernel + gcc 4.1 = several problems

Hello, 

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

Download attachment "benchmark.png" of type "image/png" (6165 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ