Re: bitcount32: replace lengthy comment with SWAR reference

From: Andriy Gapon <avg_at_FreeBSD.org>
Date: Sun, 08 May 2011 11:57:20 +0300
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
Received on Sun May 08 2011 - 06:57:25 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:13 UTC