From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759904AbYDSKGI (ORCPT ); Sat, 19 Apr 2008 06:06:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753387AbYDSKF5 (ORCPT ); Sat, 19 Apr 2008 06:05:57 -0400 Received: from aun.it.uu.se ([130.238.12.36]:53193 "EHLO aun.it.uu.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753351AbYDSKF4 (ORCPT ); Sat, 19 Apr 2008 06:05:56 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18441.50147.324276.27512@harpo.it.uu.se> Date: Sat, 19 Apr 2008 12:05:23 +0200 From: Mikael Pettersson To: dean gaudet Cc: Joe Perches , Harvey Harrison , Alexander van Heukelum , Alexander van Heukelum , Ingo Molnar , Andi Kleen , LKML Subject: Re: Alternative implementation of the generic __ffs In-Reply-To: References: <20080331171506.GA24017@mailshack.com> <20080401084710.GB4787@elte.hu> <20080401094618.GA24862@mailshack.com> <1207507897.18129.1246358115@webmail.messagingengine.com> <1207563950.7880.1246457209@webmail.messagingengine.com> <20080418201809.GA5036@mailshack.com> <1208563762.10414.19.camel@brick> <1208566724.4891.25.camel@localhost> <1208567093.10414.20.camel@brick> <1208573728.11990.14.camel@localhost> X-Mailer: VM 7.17 under Emacs 20.7.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org dean gaudet writes: > 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 16-bit immediates don't help, as ARMs express immediate operands in arithmetic instructions as 8-bit values plus a 4-bit rotation count (which is multiplied by 2). Very new ARMs can construct full 16-bit immediates, but that still takes an additional instruction and an additional register.