rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: Chris Siebenmann <cks>
To: rc
Subject: Why I want read to be a builtin:
Date: Tue, 15 Jun 1993 16:45:08 -0400	[thread overview]
Message-ID: <93Jun15.164516edt.2706@hawkwind.utcs.toronto.edu> (raw)

 read.sh is a 'while read; do : ; done' loop; line.sh is a 'while line
>/dev/null; do :; done' loop.

: hawkwind.utcs ; wc -l foo; time ./read.sh <foo; time ./line.sh <foo
    1000 foo
        0.8 real         0.5 user         0.2 sys  
       38.1 real         9.4 user        26.5 sys  

 Sometimes 'read' is what you need for something, and when it is, having
to run an external program for it can really kill performance. I'd really
rather write everything in rc, but when read comes up right now, I'm
forced to drop into sh.

	- cks


                 reply	other threads:[~1993-06-15 20:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=93Jun15.164516edt.2706@hawkwind.utcs.toronto.edu \
    --to=rc@hawkwind.utcs.toronto.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).