rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: John (Most modern computers would break if you stood on them) Mackin <john@ civil.su.oz.au>
To: The rc Mailing List <rc@hawkwind.utcs.toronto.edu>
Subject: Re: Speed of rc
Date: Fri, 9 Apr 1993 12:39:38 -0400	[thread overview]
Message-ID: <199304100239.22248.rc.bagiy@civil.su.oz.au> (raw)
In-Reply-To: <93Apr9.123225edt.28706@plg.uwaterloo.ca>

Summary: Dave Mason shows us, once again, that shots from the hip
usually miss.

    rc will have a significantly larger environment (rc functions) than
    sh, and many systems have *abysmal* exec performance because of the
    time spent copying the environment.

I don't know if you just didn't bother to read my mail, Dave, or what.
rc and sh were both being executed with precisely the same environment.
So whatever contribution exec makes in copying the environment will
have been the same for both.

For the record, I just did a wc of my environment and it is around 2100
characters.

As to `rc functions,' never forget than an important factor in the
_startup_ time of Byron's rc is that it imports functions lazily.
Of course, startup time is specifically not at issue here.

    So, John: try a version of rc with an empty environment.  I suspect
    the system times will be as fast as those for sh.

BZZZZZT!  Sorry, Player One, you lose this time, but thanks for trying...

: mod;; env - sh
$ /bin/time /bin/sh -c '/bin/cat pus2 | /usr/local/bin/rc'
       27.5 real         1.3 user        24.7 sys  
$ /bin/time /bin/sh -c '/bin/cat pus2 | /usr/local/bin/rc'
       27.7 real         1.2 user        25.1 sys  
$ /bin/time /bin/sh -c '/bin/cat pus2 | /usr/local/bin/rc'
       27.5 real         1.1 user        25.0 sys  
$ /bin/time /bin/sh -c '/bin/cat pus2 | /usr/local/bin/rc'
       27.4 real         1.1 user        24.7 sys  
$ /bin/time /bin/sh -c '/bin/cat pus2 | /bin/sh'
       17.2 real         1.3 user        14.9 sys  
$ /bin/time /bin/sh -c '/bin/cat pus2 | /bin/sh'
       16.8 real         1.4 user        14.4 sys  
$ /bin/time /bin/sh -c '/bin/cat pus2 | /bin/sh'
       16.8 real         1.5 user        14.2 sys  
$ /bin/time /bin/sh -c '/bin/cat pus2 | /bin/sh'
       16.9 real         1.4 user        14.8 sys  

Clearly, with an empty environment, we can't do any path searching,
so I tried only pus2 this time, with the "./xx"s in it.

We still see rc using a much higher system time than sh.  Interestingly,
sh's user-time has come down to on a par with rc's.  I won't offer
any speculation on that one.

OK,
John.


  reply	other threads:[~1993-04-09 16:48 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
1993-04-09 19:22       ` Dave Mason
1993-04-09 21:12         ` Chris Siebenmann
  -- strict thread matches above, loose matches on Subject: below --
1993-04-15 20:26 speed " Tom Culliton x2278
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 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=199304100239.22248.rc.bagiy@civil.su.oz.au \
    --to=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).