[rescue] VAXstation questions

Frank Van Damme frank.vandamme at student.kuleuven.ac.be
Wed May 14 08:48:54 CDT 2003


On Wednesday 14 May 2003 01:02, Dave McGuire wrote:
> > I suspected something like that... Now if you could comment on the
> > memory
> > usage a bit :-)
>
>    Oh, that's a fun one.  First of all, they're very forgiving about
> object alignment in memory...much less memory is "wasted" in general,
> relative to some other architectures.  Alpha comes to mind...In very
> basic terms, Alphas trade off memory utilization efficiency for memory
> access performance.

M-hm... 

>    The second (and probably biggest) thing is the fact that the VAX
> architecture is the very epitome of CISC.  Single instructions that
> perform operations which would take dozens of instructions on a modern
> RISC architecture.  You're no doubt familiar with Cyclic Redundancy
> Check...CRC.  It takes about half a page of C code to implement a CRC.  
> The VAX has a CRC *instruction*.  This greater instruction "potency"
> (for lack of a better term) means it takes far fewer bytes of machine
> code to perform the same work.

I see.

>    Here is a real-world example of this, again drawing a comparison
> between VAX and Alpha architectures, using this trivial C program:
>
> #include <stdio.h>
> void main(void)
> {
>    printf("hello world\n");
> }
>
>    On an Alpha running NetBSD, observe the compiled and stripped binary:
>
> snagglepuss$ ls -l helloworld
> -rwxr-xr-x  1 mcguire  wheel  6640 May 13 18:57 helloworld*
> snagglepuss$ size helloworld
> text    data    bss     dec     hex     filename
> 3479    580     80      4139    102b    helloworld
> snagglepuss$
>
>    ...while on a VAX, also running NetBSD, built from an identical
> source file:
> 
> vlc$ ls -l helloworld
> -rwxr-xr-x  1 mcguire  wheel  3816 May 13 18:57 helloworld
> vlc$ size helloworld
> text    data    bss     dec     hex     filename
> 1844    260     40      2144    860     helloworld
> vlc$

And that's simply hello world? Gosh. 

>    Get it?

Pretty much. So in generally, binary sizes on Cisc cpu's (x86?) should be 
smaller then in Risc cpu's (like sparc or mips)? 

-- 
Frank Van Damme    http://www.openstandaarden.be 
~~~~~~~~~~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"Click a link for instructions according to your operating system. If
you don't know what an operating system is, click Windows."



More information about the rescue mailing list