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: <alpine.DEB.1.10.0804182112360.6108@twinlark.arctic.org>
Date:	Fri, 18 Apr 2008 21:13:47 -0700 (PDT)
From:	dean gaudet <dean@...tic.org>
To:	Joe Perches <joe@...ches.com>
cc:	Harvey Harrison <harvey.harrison@...il.com>,
	Alexander van Heukelum <heukelum@...lshack.com>,
	Alexander van Heukelum <heukelum@...tmail.fm>,
	Ingo Molnar <mingo@...e.hu>, Andi Kleen <andi@...stfloor.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: Alternative implementation of the generic __ffs

On Fri, 18 Apr 2008, Joe Perches wrote:

> On Fri, 2008-04-18 at 18:11 -0700, dean gaudet wrote: 
> > have you benchmarked it?
> 
> I modified Alexander's benchmark:
> http://lkml.org/lkml/2008/4/18/267
> to include 32 and 64 bit variants called smallest.
> 
> On an old ARM:

i'm guessing the 32-bit constants suck :(

the code could be modified to use 16-bit constants only -- it would add 
some dependent operations though (to move the hot bit into the low 
16-bits).

-dean


> 
> $ gcc --version gcc (GCC) 3.4.6
> 
> $ cat /proc/cpuinfo 
> Processor	: Intel StrongARM-110 rev 4 (v4l)
> BogoMIPS	: 262.14
> Hardware	: Rebel-NetWinder
> Revision	: 57ff
> Serial		: 000000000000185c
> 
> $ gcc -Os -fomit-frame-pointer ffs.c
> $ ./a.out
> Original:       3180 tics,  8379 tics
> New:            4280 tics,  8890 tics
> Smallest:       4027 tics,  7835 tics
> Empty loop:     1543 tics,  2260 tics
> 
> $ gcc -O2 -fomit-frame-pointer ffs.c
> $ ./a.out
> Original:       3161 tics,  7843 tics
> New:            4778 tics,  8783 tics
> Smallest:       4408 tics,  7149 tics
> Empty loop:     1515 tics,  2140 tics
> 
> $ gcc -O3 -fomit-frame-pointer ffs.c
> $ ./a.out
> Original:       3078 tics,  7692 tics
> New:            4714 tics,  8671 tics
> Smallest:       4344 tics,  7117 tics
> Empty loop:     1444 tics,  2024 tics
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ