Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!mips!winchester!mash From: mash@mips.COM (John Mashey) Newsgroups: comp.arch Subject: Re: Re: a style question Message-ID: <41898@mips.mips.COM> Date: 3 Oct 90 19:22:16 GMT References: <1990Oct2.151644.1581@phri.nyu.edu> <1300002@hp-ptp.HP.COM> <2572@lectroid.sw.stratus.com> Sender: news@mips.COM Reply-To: mash@mips.COM (John Mashey) Organization: MIPS Computer Systems, Inc. Lines: 18 In article <2572@lectroid.sw.stratus.com> dswartz@bigbootay.sw.stratus.com (Dan Swartzendruber) writes: >Can you say "nitpicking over whether to do == or < is silly micro-level >optimization which can't even be relied on to behave the same from one >machine to the next"? I knew you could! At the code level, this is probably true, although it certainly is the case that there are fundamental computer system design reasons why == might be faster than <. Whether these reasons show up in any given computer architecture is another issue, but certainly, if you care, the == or != tests are likely to be equal or faster on many machines, or equal on others, but seldom slower. It probably doesn't matter most places, except in some technical code with short loops with many iterations. -- -john mashey DISCLAIMER: UUCP: mash@mips.com OR {ames,decwrl,prls,pyramid}!mips!mash DDD: 408-524-7015, 524-8253 or (main number) 408-720-1700 USPS: MIPS Computer Systems, 930 E. Arques, Sunnyvale, CA 94086