From owner-freebsd-arch@FreeBSD.ORG Thu Nov 15 19:56:41 2012 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 95944F19; Thu, 15 Nov 2012 19:56:41 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from hammer.pct.niksun.com (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 420D28FC14; Thu, 15 Nov 2012 19:56:41 +0000 (UTC) Message-ID: <50A548C6.5070208@FreeBSD.org> Date: Thu, 15 Nov 2012 14:55:50 -0500 From: Jung-uk Kim User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:16.0) Gecko/20121031 Thunderbird/16.0.2 MIME-Version: 1.0 To: Julian Elischer Subject: Re: [RFC] Generic population count function References: <50A43B52.8030102@FreeBSD.org> <50A477BA.4020700@freebsd.org> In-Reply-To: <50A477BA.4020700@freebsd.org> X-Enigmail-Version: 1.4.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-arch@freebsd.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2012 19:56:41 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2012-11-15 00:03:54 -0500, Julian Elischer wrote: > there are more efficient algorithms than the one you show in > bitcount.h see the bit-twidling site: > > http://graphics.stanford.edu/~seander/bithacks.html Yes, I know that. __bitcount32() is a fall-back for *unsupported* compilers anyway, I didn't see much point in improving it further. If you are looking for better population count functions, this site is better, actually: http://www.dalkescientific.com/writings/diary/archive/2011/11/02/faster_popcount_update.html Jung-uk Kim -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) Comment: Using GnuPG with Mozilla - http://www.enigmail.net/ iEYEARECAAYFAlClSMYACgkQmlay1b9qnVPIegCgyPDEgRaKkgEj9TWAfI09G5Cg ugQAn1orRlZDSqUUTYa2fCIwtYSIAegh =49wE -----END PGP SIGNATURE-----