Xref: utzoo comp.os.vms:9543 comp.unix.questions:9890 comp.unix.wizards:11903 Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!uflorida!haven!h.cs.wvu.wvnet.edu!b.cs.wvu.wvnet.edu!dymm From: dymm@b.cs.wvu.wvnet.edu (David Dymm) Newsgroups: comp.os.vms,comp.unix.questions,comp.unix.wizards Subject: UNIX vs. VMS - SYSTEM FUNCTIONS Message-ID: <82@h.cs.wvu.wvnet.edu> Date: 24 Oct 88 21:27:13 GMT Sender: news@h.cs.wvu.wvnet.edu Lines: 50 *** 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@b.cs.wvu.wvnet.edu