Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cmcl2!phri!marob!cowan From: cowan@marob.masa.com (John Cowan) Newsgroups: comp.lang.c Subject: Re: What looks efficient may not be Keywords: efficiency, increment operator Message-ID: <719@marob.masa.com> Date: 31 May 89 20:10:21 GMT References: <7703@saturn.ucsc.edu> <9146@csli.Stanford.EDU> Reply-To: cowan@marob.masa.com (John Cowan) Distribution: usa Organization: ESCC New York City Lines: 15 In article <9146@csli.Stanford.EDU> poser@csli.Stanford.EDU (Bill Poser) writes: [in reference to two loops, one of which pre-increments a variable, and the other post-increments a variable, and nothing else] >Of course, a smart compiler will recognize that in these examples >the value of i is never used and will not bother with the save. > A >really< smart compiler would recognize that the loops don't do anything at all, and kill them both! -- John Cowan or UUCP mailers: ...!uunet!hombre!{marob,magpie}!cowan Fidonet (last resort): 1:107/711 Aiya elenion ancalima!