UNIX vs. VMS - SYSTEM FUNCTIONS

David Dymm dymm at b.cs.wvu.wvnet.edu
Tue Oct 25 07:27:13 AEST 1988


*** Question 1 ***
I have been timing the relative differences between the speeds
of the functions "strlen" and "strcpy" as executed on UNIX
and VMS.  Why is one system so much faster?  Is it just the machine
mips that accounts for the differences?

*** Question 2 ***
I am also concerned on VMS with the differences between the use of the
"system" functions and my own function.


VMS - We are running vms 4.7 with version 2.3 of the C compiler
on a Vaxstation 2000. 
UNIX - We are running Sun 3.5 (UNIX BSD 4.2) on a 3/280 set up
as a multi-user system with 14 users connected via a multiplexor.

For example, the following times (seconds) for strlen computes the length
of an 80 charactrer string in a loop 200,000 times:
	UNIX		VMS
		    system    mine
	10	      68       51

The following times (seconds) for strcpy does 200,000 string copies
with the copied string 50 characters in length:
	UNIX		VMS
		    system    mine
	6.5	       57      29

Does anyone have a good explanation for the differences in times?
Perhaps the differences between UNIX and VMS are due to the
speeds of the machines.
But why is my functions on VMS faster than the system supplied functions?
I had assumed that the system functions are perhaps written in assembler
so that they are truly optomized.  Not true????


David Dymm			Software Engineer

                            *************************************
                            *  Violence is the last refuge of   *
                            *  the incompetent.                 *
                            *                      Hardin       *
                            *************************************

USMAIL: Bell Atlantic Knowledge Systems,
        145 Fayette Street, Morgantown, WV 26505
PHONE:	304 291-9898 (8:30-4:30 EST)
USENET:  {allegra,bellcore, cadre,idis,psuvax1}!pitt!wvucsb!dymm
INTERNET: dymm at b.cs.wvu.wvnet.edu



More information about the Comp.unix.questions mailing list