Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!spool.mu.edu!agate!dog.ee.lbl.gov!elf.ee.lbl.gov!torek From: torek@elf.ee.lbl.gov (Chris Torek) Newsgroups: comp.arch Subject: Re: new instructions Message-ID: <13574@dog.ee.lbl.gov> Date: 25 May 91 03:28:48 GMT References: <24263@lanl.gov> <1991May23.220143.8515@kithrup.COM> <1991May23.204624.22872@shograf.com> <1991May24.122453.11011@cs.umu.se> <13555@dog.ee.lbl.gov> Reply-To: torek@elf.ee.lbl.gov (Chris Torek) Organization: Lawrence Berkeley Laboratory, Berkeley Lines: 19 X-Local-Date: Fri, 24 May 91 20:28:48 PDT In article <13555@dog.ee.lbl.gov> I wrote: >... and I put together this program from other people's methods, >plus a few variants of my own. I had forgotten, but have now remembered, that I based it on someone else's program. Unfortunately, I have forgotten who the Someone Else was, so one of the Teeming Millions will have to supply the Credit Where Credit Is Due Department with the answer to that one. I also have some more bitcount functions from Arthur Olson and others; one of these (ab)uses the C preprocessor to build a 65536-entry count table at compile time, so that 32-bit counts can be computed as tab[n & 0xffff] + tab[(unsigned long)n >> 16] which is often faster than any of the methods in my previous posting. -- In-Real-Life: Chris Torek, Lawrence Berkeley Lab CSE/EE (+1 415 486 5427) Berkeley, CA Domain: torek@ee.lbl.gov