From owner-freebsd-current@FreeBSD.ORG Sun May 8 08:57:25 2011 Return-Path: Delivered-To: current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1538E106566B for ; Sun, 8 May 2011 08:57:25 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 5CEF28FC12 for ; Sun, 8 May 2011 08:57:24 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id LAA15088; Sun, 08 May 2011 11:57:21 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1QIznl-0007Cd-4s; Sun, 08 May 2011 11:57:21 +0300 Message-ID: <4DC65AF0.3030202@FreeBSD.org> Date: Sun, 08 May 2011 11:57:20 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.17) Gecko/20110503 Lightning/1.0b2 Thunderbird/3.1.10 MIME-Version: 1.0 To: Stefan Bethke References: <4DC517B3.8050502@FreeBSD.org> <20110507104748.GL48734@deviant.kiev.zoral.com.ua> <4DC5B2A4.60603@FreeBSD.org> <4A9DD4AC-94CF-4AA5-AB17-8597CB6EB394@lassitu.de> In-Reply-To: <4A9DD4AC-94CF-4AA5-AB17-8597CB6EB394@lassitu.de> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Kostik Belousov , current@FreeBSD.org Subject: Re: bitcount32: replace lengthy comment with SWAR reference X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 May 2011 08:57:25 -0000 on 08/05/2011 00:19 Stefan Bethke said the following: > Your google-fu is clearly superior. It took me a couple tries to find the > page you're refering to. > > http://aggregate.org/MAGIC/#Population%20Count%20%28Ones%20Count%29 > > Why not put a link in there directly? I just prefer a reference I can > actually look up over an acronym that (by itself) cannot easily be resolved. Well, picking color for a bikeshed is never easy :-) What you say makes a lot of sense and I don't disagree. But I am sticking with the originally proposed color as I believe that in this age of Internet and search engines a descriptive term is better than an URL that may change or a reference to a book that may not be readily available to a reader. > The algorithm itself seems to predate SWAR significantly: according to > Hackers Delight, it was described in /Combinatorial Algorithms: Theory and > Pratice/ in 77. > > The code in systm.h appears to be a slightly less optimized version of the > algorithm presented in SWAR or Hacker's Delight. -- Andriy Gapon