Re: /bin/bash vs. /bin/sh

Todd Fries (tfries@umr.edu)
Tue, 19 Sep 1995 11:46:56 +0000 (GMT)


> > > [108K stripped-down pdksh]
> >
> > My personal experience has varied greatly from this. I simply compiled bash
> > shaired, and now I have a 6k executable with a 370k shaired library.
> > Very acceptable, imho...
>
> Er, how is this an improvement over a 376k executable? I guess maybe
> the shared library will stay resident, but so will the binary itself.
>
> Also, it will run marginally slower that way. Not that this matters
> much (most shell script overhead is from fork and exec)..
>
> > Just thought I'd point out that size really doesn't need to be an issue.
>
> It is, and it should be.

Well, either a) I'm halucinating or b) there is a use in having a 6k executable.

If I run 12 copies of bash, 301k (static size for me) * 6 = 1806k executable in ram
6k (dynamic size) * 6 = 18k executable in ram

I know I neglected data space, but that should be the same for all and not an issue.
Oh, I forgot. 18k(executable)+370k(dynamic lib)=388k....and 1806k-388k=1418k savings.

I know it is marginally slower to load an executable and link it with a library. But
you're telling me it is faster to load 301k than to load 6k and link it with a library?

I'm talking what I know; I realize I have no numbers to backup what I say.

Would someone please verify this since I have no clue how to determine size usages
of executables, nor load time and link time?

In my experience, X went from a swapp-happy almost-unusable beast to a silent hard drive
when I change from 301k bash and 70k rxvt to 6k bash and 3k rxvt...so imho shaired is
better....this is with a 386sx25 8mb ram...svga @ 1152x900x256...

-- 
Todd Fries...tfries@umr.edu
http://www.cs.umr.edu/~tfries