Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!ames!amdahl!pacbell!att!dptg!pegasus!psrc From: psrc@pegasus.ATT.COM (Paul S. R. Chisholm) Newsgroups: comp.lang.c++ Subject: Re: 1.2 vs 2.0 program size Summary: stuck between a VAX(TM) and a rocky place Message-ID: <4243@pegasus.ATT.COM> Date: 11 Nov 89 05:13:31 GMT References: <1473@aber-cs.UUCP> <1989Nov8.181203.1967@utzoo.uucp> Organization: AT&T Bell Laboratories Lines: 42 In article <1473@aber-cs.UUCP> pcg@cs.aber.ac.uk (Piercarlo Grandi) writes: > Actually, a requirement for C (and C++ by extension) is that the > implementation must provide FAST procedure calls... In article <1989Nov8.181203.1967@utzoo.uucp>, henry@utzoo.uucp (Henry Spencer) writes: > From my notes from a Usenix conference a few years ago: > Steve Johnson, talking about the cost of function calls in C: >... > The result was fairly cleanly-built programs, some of which unfortunately > spend 50% of their time in the call/return sequence when run on a VAX. (This from the person who tells people not to believe all the world's a VAX?-) Part of the VAX architectural design was the standard way to make subroutine calls. The architects at DEC came up with a method that was simple, straightforward, language independent, friendly to debuggers and other such tools . . . and very inefficient of time. Steve Johnson, who did the first (and maybe most important) VAX C compiler, was faced with a dilemma. Accept the VAX design, with its merits and its performance penalties? Or be an orphan, closing the door on any chance of communicating with other code? He was doing a research project, not a commercial product; as such, the first choice was a clear winner over the second. I'd say the high subroutine call overhead, not just in general but in the VAX in particular, was one of the sparks* that lead to the Reduced Instruction Set Computer (RISC) movement. All of which goes to show that inlining functions can be a big win, especially with abstract data types (object-oriented or not), where you write lots of trivial subroutines to provide limited access to a value. > Henry Spencer, uunet!attcan!utzoo!henry, henry@zoo.toronto.edu Paul S. R. Chisholm, AT&T Bell Laboratories att!pegasus!psrc, psrc@pegasus.att.com, AT&T Mail !psrchisholm I'm not speaking for the company, I'm just speaking my mind. VAX is a trademark of Digital Equipment Corporation (I think). *No pun intended (yeah, right:-)