From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from oldp.astro.wisc.edu ([128.104.39.15]) by hawkwind.utcs.toronto.edu with SMTP id <2679>; Wed, 22 Sep 1993 12:50:02 -0400 Received: by oldp.astro.wisc.edu (5.65/DEC-Ultrix/4.3) id AA07184; Wed, 22 Sep 1993 11:49:42 -0500 Message-Id: <9309221649.AA07184@oldp.astro.wisc.edu> To: rc@hawkwind.utcs.toronto.edu Subject: Re: builtins and more Date: Wed, 22 Sep 1993 12:49:42 -0400 From: Alan Watson X-Mts: smtp Malte writes: > About the performance of a backquote-style read: > I have checked the difference between > while(){ echo `{ /bin/echo true }} > and > while(){ echo `{ echo true }} > on my favourite machine. It seems to me that the exec(2) is by far more > expensive than the fork(2). So the backquote solution may be a good compromise > between clearity and performance. On DEC MIPS and Alpha machines, fork and exec are both take approximately the same time. Read is a perfomance hack, and a worse one than builtin echo; it isn't as elegant as `line, but it is fast enough to be much more useful. I would much rather see fork and exec speeded up by a few orders of magnitude, but we all know that isn't going to happen.