rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: Alan Watson <alan@oldp.astro.wisc.edu>
To: rc@hawkwind.utcs.toronto.edu
Subject: Re: builtins and more
Date: Wed, 22 Sep 1993 12:49:42 -0400	[thread overview]
Message-ID: <9309221649.AA07184@oldp.astro.wisc.edu> (raw)

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.

             reply	other threads:[~1993-09-22 16:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-09-22 16:49 Alan Watson [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-09-22 12:52 malte
1993-09-22 16:57 ` Chris Siebenmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9309221649.AA07184@oldp.astro.wisc.edu \
    --to=alan@oldp.astro.wisc.edu \
    --cc=rc@hawkwind.utcs.toronto.edu \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).