Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!david From: david@sun.uucp (David DiGiacomo) Newsgroups: comp.arch Subject: Re: RISC v. CISC --more misconceptions Message-ID: <75464@sun.uucp> Date: 31 Oct 88 20:59:43 GMT References: <156@gloom.UUCP> <18931@apple.Apple.COM> <40@sopwith.UUCP> <998@l.cc.purdue.edu> Reply-To: david@sun.com (David DiGiacomo) Organization: Sun Microsystems, Inc. - Mtn View, CA Lines: 25 In article <998@l.cc.purdue.edu> cik@l.cc.purdue.edu (Herman Rubin) writes: >There are many other operations which are cheap in hardware and expensive in >software. ... I will toss in a few for starters. I think you're going to have to find some better examples... > Find the distance to the next one in a bit stream FAST. It would >be good to have an exception handler if one is not found. I am considering >algorithms not worth implementing if the operation is slow. This is very cheap in software (runs at close to memory bandwidth). Find the first nonzero word, then the first nonzero byte in that word, then do a table lookup. If it really has to be FAST, use a 16 bit table. > Divide an integer by an integer, obtaining a quotient and a remainder, >the choice of remainder depending on the signs of the dividend and the divisor. > > Divide a floating point number by a floating point number, obtaining >an integer quotient and a floating point remainder. It would be nice to have >the choice of remainder depending on the signs here also. These operations are *extremely* expensive in hardware. -- David DiGiacomo, Sun Microsystems, Mt. View, CA sun!david david@sun.com