Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site yetti.UUCP Path: utzoo!utcs!mnetor!yetti!oz From: oz@yetti.UUCP (Ozan Yigit) Newsgroups: net.lang.c Subject: Re: Re: String Copy idiom Message-ID: <107@yetti.UUCP> Date: Thu, 14-Mar-85 14:24:09 EST Article-I.D.: yetti.107 Posted: Thu Mar 14 14:24:09 1985 Date-Received: Tue, 26-Mar-85 12:22:25 EST References: <1061@decwrl.UUCP> <307@petrus.UUCP> Organization: York U. Comp.Sci. Downsview, ONT. Lines: 30 > > Careful, things are not as simple as they seem. It turns out that while > the early DEC VMS C compiler was better at compiling expressions and > statements, it lost out to the UNIX C compiler in proceedure calls, > since it followed the VMS standard (which either saves more registers > or uses slower instructions, I'm not sure which)... The procedure calls are perhaps slower in VMS C compiler, due to saving all the registers that VMS C compiler so greedily uses. One should remember, however, that if the programmer were to hand-specify as many registers as he possibly can, to improve his/her program, this would result in an identical procedure call on, say C compiler of 4.2., which would be just as slow or fast, however you look at it. > > So, while your example program ran faster, troff/nroff runs slower if > compiled with the early VMS C compiler (this info from Steve Johnson's > course on PCC2 about 2 years ago). I am not sure what the net result > would be if you recompiled all of UNIX with the VMS C compiler, but > I wouldn't bet either way. True, I would not bet on it either. But, aside from greedy register algorithm in VMS C, If the BSD C compiler was as smart as VMS C in optimization and architecture utilization, you would have a *MUCH* faster 4.2 !! Oz (wizard of something or another, no doubt) Dept. of Computer Science York University {utzoo | utcs}!yetti!oz