Path: utzoo!utgpu!attcan!uunet!mcvax!dik From: dik@cwi.nl (Dik T. Winter) Newsgroups: comp.arch Subject: Re: Leading zero and pop count Message-ID: <7711@boring.cwi.nl> Date: 10 Nov 88 21:51:52 GMT References: <10882@hall.cray.com> <705@convex.UUCP> Organization: CWI, Amsterdam Lines: 14 In article <705@convex.UUCP> loeliger@convex.com (Jon Loeliger) writes: > Yep, they are used elsewhere. Convex C1 and C2 both have trailing-zero-count > and population counts. There is actually an esoteric reason to prefer a > leading zero count over a trailing count.... The best reason is of course that, given a popcount instruction, getting a trailing zero count takes only four instructions(*). Getting a leading zero count takes a few more. (*) POPCOUNT(AND(NOT(X),X-1)) -- dik t. winter, cwi, amsterdam, nederland INTERNET : dik@cwi.nl BITNET/EARN: dik@mcvax