Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!samsung!munnari.oz.au!csc.anu.oz.au!csc3.anu.oz.au!anucsd!neccan!peter From: peter@neccan.oz (Peter Miller) Newsgroups: comp.lang.c Subject: Re: count of bits set in a long Message-ID: <821@neccan.oz> Date: 25 Sep 90 23:35:18 GMT References: <13772@paperboy.OSF.ORG> Organization: NEC Information Systems Australia, Canberra Lines: 35 In article <37545@ut-emx.uucp> nwagner@ut-emx.uucp (Neal R. Wagner) writes: > > I need a fast method to count the number of bits that are set in a 32-bit >integer on a Sun 3/80 running 4.0.3 SunOS. HACKMEM 169 you can do it in straight line code, no loop. A handful of shifts, a couple of subtracts, and a modulo. (Hint: modulo 63) Look in the X11 sample server sources. Grep for "HACKMEM". D#! rnews 1014 Newsgroups: dcs.general Path: anucsd!anucsd!daw From: daw@anucsd.anu.oz.au (David Wanless) Subject: Seamail - Wilderness diaries and calendars Message-ID: Sender: news@anucsd.anu.oz.au (USENET News software) Organization: ANU Department of Computer Science Distribution: dcs Date: 26 Sep 90 01:04:01 GMT Wondering what to send to your overseas colleagues and relatives for Christmas (knowing that seamail postage deadlines are fast approaching) ? Why not send them an Australian wilderness calendar or diary ? Wilderness Society landscape and wildlife calendars, and ACF diaries, are all profusely illustrated with beautiful photographs, and all proceeds go towards the campaigns of TWS and ACF. If interested, contact me, or visit the Wilderness Shop in the Griffin Centre in Civic (ph. 249 8011). David Wanless, (Room 225, Computer Science Department, phone 5142 (afternoons), e-mail to daw@anucsd).