Article View: comp.compression.research
Article #39Re: Algorithm for finding set bits in a bit-string.
From: Eliot Moss
Date: Sun, 26 Jul 1992 02:23
Date: Sun, 26 Jul 1992 02:23
17 lines
1503 bytes
1503 bytes
The "find first set bit" operation was recently discussed at length in comp.arch, and could be relevant, especially if the one bits are sparse. If finding the one bits in a set is done frequently enough, and the ones are not necessarily all that sparse, then you might want to do something like picking up a byte and doing a 256 way switch statement (or indexing a pre-calculated array, etc.) to avoid the bit by bit testing and looping. If you can tell folks more about that your friend is trying to accomplish you get might get higher quality suggestions :-). You should consider if comp.compress.research is the right place for the discussion, too .... -- J. Eliot B. Moss, Associate Professor Department of Computer Science Lederle Graduate Research Center University of Massachusetts Amherst, MA 01003 (413) 545-4206, 545-1249 (fax); Moss@cs.umass.edu
Technical Details
Message-ID:
<MOSS.92Jul25222337@ibis.cs.umass.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!mips!zaphod.mps.ohio-state.edu!caen!nic.umass.edu!dime!dime.cs.umass.edu!mossReferences:
<1992Jul26.010325.9885@infonode.ingr.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!dtix!darwin.sura.net!mips!zaphod.mps.ohio-state.edu!caen!nic.umass.edu!dime!dime.cs.umass.edu!moss From: moss@cs.umass.edu (Eliot Moss) Newsgroups: comp.compression.research Subject: Re: Algorithm for finding set bits in a bit-string. Message-ID: <MOSS.92Jul25222337@ibis.cs.umass.edu> Date: 26 Jul 92 02:23:37 GMT References: <1992Jul26.010325.9885@infonode.ingr.com> Sender: news@dime.cs.umass.edu Reply-To: moss@cs.umass.edu Organization: Dept of Comp and Info Sci, Univ of Mass (Amherst) Lines: 17 In-reply-to: aaronb@suhana.analog.ingr.com's message of 26 Jul 92 01:03:25 GMT