From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H. Peter Anvin" Subject: Re: [PATCH] x86: Add optimized popcnt variants Date: Thu, 25 Feb 2010 21:27:25 -0800 Message-ID: <4B875BBD.4060104@zytor.com> References: <20100219164512.GA492@aftab> <4B7EC20C.30607@zytor.com> <20100222141737.GB21233@aftab> <4B82BD01.3030008@zytor.com> <20100222184945.GD21233@aftab> <4B82E144.1050007@zytor.com> <20100223155852.GF30382@aftab> <4B84118C.90203@zytor.com> <20100223175457.GA2401@aftab> <4B841BC3.1000908@zytor.com> <20100223190614.GB2401@aftab> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Michal Marek , linux-kbuild , Peter Zijlstra , Andrew Morton , Wu Fengguang , LKML , Jamie Lokier , Roland Dreier , Al Viro , "linux-fsdevel@vger.kernel.org" , Ingo Molnar , Brian Gerst To: Borislav Petkov Return-path: In-Reply-To: <20100223190614.GB2401@aftab> Sender: linux-kbuild-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On 02/23/2010 11:06 AM, Borislav Petkov wrote: > > Ok, here you go. > > -- > From: Borislav Petkov > Date: Thu, 11 Feb 2010 00:48:31 +0100 > Subject: [PATCH] x86: Add optimized popcnt variants > > Add support for the hardware version of the Hamming weight function, > popcnt, present in CPUs which advertize it under CPUID, Function > 0x0000_0001_ECX[23]. On CPUs which don't support it, we fallback to the > default lib/hweight.c sw versions. > > A synthetic benchmark comparing popcnt with __sw_hweight64 showed almost > a 3x speedup on a F10h machine. > > Signed-off-by: Borislav Petkov OK, this patch looks pretty good now, but I'm completely lost as to what the baseline of this patch is supposed to be. -hpa -- H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.