rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: culliton@srg.af.mil (Tom Culliton x2278)
To: byron@netapp.com, john@civil.su.oz.au
Cc: rc@hawkwind.utcs.toronto.edu
Subject: Re: speed of rc
Date: Thu, 15 Apr 1993 16:26:45 -0400	[thread overview]
Message-ID: <9304151626.aa12954@ceres.srg.af.mil> (raw)

Since I started this thread I wanted stop for a moment to agree whole
heartedly with John in praise of rc.  My experience is that Byron's rc
is completely stable, bug free, solid as a rock, easily ported, clean,
polished, a pleasure to use, etc.  My comments definitely fall into the
category of nitpicking. I've pushed it in all sorts of strange and
intresting ways, and (aside from a porting bug caused by SCO's flakey
signal.h) never had it fail.  Byron has nothing to apologize for and a
great deal to be very proud of.

To Byron in particular: The design philosophy behind rc has my
strongest endorsement, perl is a monster, and like one of those "all in
one" kitchen gadgets I find it completely useless.  It is unstable and
buggy, takes forever to port, and otherwise generally makes my head
ache.  My concerns about the speed of rc come from trying to do big
production type jobs with it and trying to evangelize to the unwashed
sh/csh types around here.  (Our sysadmins can't even be bothered to
support bash, and do ksh only grudgingly.  Since rc is simple enough
for anyone to understand and bug free, it would be a perfect solution,
if I could only overcome peoples inertia.)

Byron's point about analyzing rc with prof is well taken, there are a
couple of gotchas to beware of though.  People often make to much of
flattening out the usage peaks.  A high peak doesn't necessarily mean
that means that a certain section of code is a bottle neck, it could
mean the code is optimal and efficiently doing it's work in a tight
loop. (e.g. A document format to format translator that spends 95% of
it's time in 5 lines of code that handle normal text.)  Nor does a flat
profile means that the code is optimal, it could very well mean that
lots of code extra code is getting executed. (e.g. In the translator
mentioned above doing character by character i/o rather than buffered.)
And when a program is system call bound, as Byron indicates is the case
with rc, there is still the possibility of extraneous calls. (such as
the stat call that Dave Mason and Byron mention)

Dave Mason also makes an excellent point about the size of the
environment under rc and the effect on the cost of execs.  Writing in
rc it is often natural to stick things into lists in the enviroment,
which would be in a file or pipe under sh.  Especially when trying to
avoid external programs for the sake of speed.  The fact that all
variables and functions are exported adds to this.  It wouldn't suprise
me if this was were part of my time was going under SCO ODT.  A good
thing to remember when writing scripts.

Remember, I'm not throwing stones here, just asking a question: What
can we do (if anything, and short of polluting rc with extra builtins)
to speed rc up?

Tom

PS - sorry this was so long...


             reply	other threads:[~1993-04-15 21:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-04-15 20:26 Tom Culliton x2278 [this message]
  -- strict thread matches above, loose matches on Subject: below --
1993-04-13 20:26 Byron Rakitzis
1993-04-13 21:23 ` John Mackin
1993-04-13 23:42   ` mycroft
1993-04-12  5:51 Speed " Paul Haahr
1993-04-09 15:58 Tom Culliton x2278
1993-04-08 23:09 Paul Haahr
1993-04-08 22:31 Tom Culliton x2278
1993-04-09  0:38 ` Scott Schwartz
1993-04-09 15:23   ` John Mackin
1993-04-13 19:26     ` Chris Siebenmann
1993-04-13 21:13       ` John Mackin
1993-04-09 16:32   ` Dave Mason
1993-04-09 16:39     ` John Mackin
1993-04-09 19:22       ` Dave Mason
1993-04-09 21:12         ` Chris Siebenmann
1993-04-08 20:14 Byron Rakitzis
1993-04-08 15:45 Paul Haahr
1993-04-07 19:50 Tom Culliton x2278

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=9304151626.aa12954@ceres.srg.af.mil \
    --to=culliton@srg.af.mil \
    --cc=byron@netapp.com \
    --cc=john@civil.su.oz.au \
    --cc=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).