[comp.unix.questions] rmail under HP-UX

kyle@xanth.UUCP (12/05/87)

[ Since this is not an EMACS issue I have redirected followups to
  comp.unix.questions. ]

In article <3720010@hpsemc.UUCP>, bd@hpsemc.UUCP (bob desinger) writes:
> Here's how it is on our HP-UX system, a model 840:
> 
> drwxrwxr-x   2 bin      mail        1024 Nov 25 18:45 /usr/mail
> -rwxr-sr-x   2 root     mail      137216 Oct  2 00:00 /bin/rmail

Wow!  Why is rmail so BIG?  What does HP-UX rmail do that SMAIL 2.5
doesn't?  Contrast the size of this rmail with various executables
found on our 4.3 BSD system.

-rwxr-xr-x  2 root     staff       35840 Nov  3 07:02 /bin/rmail (SMAIL 2.5)
-rwxr-xr-x  1 root     staff      104448 Jun  5  1986 /lib/ccom (C compiler)
-rwxr-xr-x  1 root     staff       97280 Dec  5 05:17 /usr/local/carmen (Lisp)
-rwsr-xr-x  1 root     staff      100352 Apr  5  1987 /usr/lib/sendmail

Just curious,

kyle jones  <kyle@odu.edu>  old dominion university, norfolk, va  usa

gwc@root.co.uk (Geoff Clare) (12/10/87)

>In article <3720010@hpsemc.UUCP>, bd@hpsemc.UUCP (bob desinger) writes:
>> Here's how it is on our HP-UX system, a model 840:

>> drwxrwxr-x   2 bin      mail        1024 Nov 25 18:45 /usr/mail
>> -rwxr-sr-x   2 root     mail      137216 Oct  2 00:00 /bin/rmail

>Wow!  Why is rmail so BIG?  What does HP-UX rmail do that SMAIL 2.5
>doesn't?  Contrast the size of this rmail with various executables
>found on our 4.3 BSD system.

>-rwxr-xr-x  2 root     staff       35840 Nov  3 07:02 /bin/rmail (SMAIL 2.5)
>-rwxr-xr-x  1 root     staff      104448 Jun  5  1986 /lib/ccom (C compiler)
>-rwxr-xr-x  1 root     staff       97280 Dec  5 05:17 /usr/local/carmen (Lisp)
>-rwsr-xr-x  1 root     staff      100352 Apr  5  1987 /usr/lib/sendmail

The HP840 is a RISC architecture machine.  Reduced instruction set implies
more instructions required to do the same job than on a 'complex'
instruction set machine, hence the proportionately larger executable files.
Presumably your 4.3BSD machine is a VAX-alike (i.e. complex instruction set).

The only other file from your list which exists on our HP840 system is
the C compiler, and look at the size of that beast!!

-rwxrwxr-x  1 bin      bin       1097728 Mar  5  1987 /lib/ccom

(No, that's not a typo - it really is more than 1 Megabyte!)

Geoff Clare              gwc@root.co.uk            seismo!mcvax!ukc!root44!gwc
-- 

Geoff Clare              gwc@root.co.uk            seismo!mcvax!ukc!root44!gwc

frank@zen.UUCP (Frank Wales) (12/15/87)

Be careful with these comparisons of size...

In article <495@root44.co.uk> gwc@root44.UUCP (Geoff Clare) writes:
>In article <3631@xanth.cs.odu.edu> kyle@xanth.cs.odu.edu (Kyle Jones) writes:
>>In article <3720010@hpsemc.UUCP>, bd@hpsemc.UUCP (bob desinger) writes:
>>> Here's how it is on our HP-UX system, a model 840:
>>> -rwxr-sr-x   2 root     mail      137216 Oct  2 00:00 /bin/rmail

Well, I'm writing this on an HP 9000 model 840, and here is the result of
ll-ing our /bin/rmail:

-r-xr-s--x   2 root     mail       71680 Mar  5  1987 /bin/rmail

Maybe Bob's machine has a later release of HP-UX than ours, or maybe
(being an HP machine) he's got a debuggable object, but nevertheless,
our rmail works fine at only half that size.

>>Wow!  Why is rmail so BIG?  What does HP-UX rmail do that SMAIL 2.5
>>doesn't?  Contrast the size of this rmail with various executables
>>found on our 4.3 BSD system.
>
>>-rwxr-xr-x  2 root     staff       35840 Nov  3 07:02 /bin/rmail (SMAIL 2.5)
>>-rwxr-xr-x  1 root     staff      104448 Jun  5  1986 /lib/ccom (C compiler)
>>-rwsr-xr-x  1 root     staff      100352 Apr  5  1987 /usr/lib/sendmail
>
>The HP840 is a RISC architecture machine.  Reduced instruction set implies
>more instructions required to do the same job than on a 'complex'
>instruction set machine, hence the proportionately larger executable files.
>Presumably your 4.3BSD machine is a VAX-alike (i.e. complex instruction set).
>
>The only other file from your list which exists on our HP840 system is
>the C compiler, and look at the size of that beast!!
>
>-rwxrwxr-x  1 bin      bin       1097728 Mar  5  1987 /lib/ccom

Well, we have a version of sendmail here too, and it's:

-r-sr-s--x   3 root     mail      147456 Sep 20 20:51 /usr/lib/sendmail

Only half as big again as the CISC version, and indeed, that seems about
average across most of the applications which we've moved from our older
machines (HP 9000 Series 500s, proprietary complex 32-bit CPUs; sorry to
see them go...).  But wait, what about that enormous compiler?  Well,
here's our Pascal and Fortran compiler sizes too:

-r-xr-x--x   1 bin      bin      1718068 Aug 29 11:17 /usr/lib/f77comp
-r-xr-x--x   1 bin      bin      2445312 Aug 29 11:16 /usr/lib/pascomp

Big, huh?  Why is this?  Because, as noted by Geoff, the HP 800 series
are RISC-based machines, and one essential component of an effective
RISC architecture is efficient optimising compilers; PCC and its cronies
just won't pass muster.  So HP rewrote all the compilers from scratch,
and they are *much* better than any others I've seen on a Unix system.
For example, cc *never* says: "syntax error"; you actually get told
what the problem is, such as: "Subscript expression must combine a
pointer and an integer".

Note also that each compiler has a built-in optimiser (no
separate /lib/c2, for example), and the FORTRAN and Pascal compilers
emit object modules directly.  

But getting to the point -- the problem is simple:  we're trying to compare
across series and architectures only on file sizes, without considering
whether the programs we're comparing actually do the same job in the
same way; a bit like comparing motor cars purely on their length.  If
such size comparison is to have any kind of meaning (and I don't
actually think it can, but I enjoy a good argument anyway), we need to
compare programs whose precise behaviour is known to be the same.  Even
then, there's no guarantee that a particular application won't run very
badly on a given architecture, or that a particular compiler won't
optimise for speed in preference to size.  Anyway, with this in mind,
here's the size of a few well-known programs on our 840; cut and
compare:

-r-xr-x--x   1 bin      bin        28672 Mar  5  1987 /bin/cat
-r-xr-x--x   2 bin      bin        77824 Mar  5  1987 /bin/ed
-rwx--x---   1 games    play      423936 Dec 11 12:19 /usr/games/bin/nethack
-r-xr-s--x   1 bin      mail      264192 Nov 20 16:07 /usr/local/bin/elm
-r-xr-x--x   1 bin      bin       837632 Sep 15 09:45 /usr/local/bin/tex


Frank Wales, Pointless Comparisons Engineer, [frank@zen.co.uk<->mcvax!zen!frank]
Zengrange Ltd., Greenfield Rd., Leeds, ENGLAND, LS9 8DB.   (+44) 532 489048 x220