Newsgroups: comp.lang.c Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: C IF statement efficiency... Message-ID: <1988Aug19.154527.17181@utzoo.uucp> Organization: U of Toronto Zoology References: <8808171400.AA05122@ucbvax.Berkeley.EDU> Date: Fri, 19 Aug 88 15:45:27 GMT In article <8808171400.AA05122@ucbvax.Berkeley.EDU> U23405@UICVM writes: > if (big > small) if (big > small) > return big; return big; > else return small; > return small; Most C compilers should generate precisely the same code for these. Really dumb ones might generate an extra "return;" after the lefthand code, not realizing that it was unreachable. -- Intel CPUs are not defective, | Henry Spencer at U of Toronto Zoology they just act that way. | uunet!attcan!utzoo!henry henry@zoo.toronto.edu