Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ernie.Berkeley.EDU!jas From: jas@ernie.Berkeley.EDU (Jim Shankland) Newsgroups: comp.unix.wizards Subject: Re: while true (was Re: Must UNIX be a memory hog?) Keywords: while, /bin/true, /bin/false Message-ID: <29237@ucbvax.BERKELEY.EDU> Date: 19 May 89 19:32:46 GMT References: <159@zebra.UUCP> <1608@auspex.auspex.com> <2@minya.UUCP> <1197@marvin.Solbourne.COM> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: jas@ernie.Berkeley.EDU.UUCP (Jim Shankland) Organization: University of California, Berkeley Lines: 17 In article <1197@marvin.Solbourne.COM> dce@Solbourne.com (David Elliott) writes: >The simplest speedup is to use a builtin command that returns >true; specifically ":". In other words, the fastest "while true" >loop is actually > > while : > do > ... > done Right; that's how I code my "while true" loops. But what I haven't figured out is: how do I optimize my "while false" loops? Jim Shankland jas@ernie.berkeley.edu "Blame it on the lies that killed us, blame it on the truth that ran us down"