Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!security!genrad!decvax!dartvax!chip From: chip@dartvax.UUCP Newsgroups: net.lang Subject: Re: static links vs. displays Message-ID: <302@dartvax.UUCP> Date: Fri, 21-Oct-83 13:50:14 EDT Article-I.D.: dartvax.302 Posted: Fri Oct 21 13:50:14 1983 Date-Received: Sat, 22-Oct-83 11:13:00 EDT References: vax2.770 Lines: 22 To be brief, displays are better if you expect many references to variables outside the current scope; other ways are better if such references are rare. The problem with displays is that they require some amount of work for every procedure call and return. Analysis has shown that most programs use only local variables and global variables--variables declared in some intermediate nesting are seldom referenced. Probably the most efficient scheme to date is Tanenbaum's, which keeps only a local and global stack frame pointer; other frames are accessible through a static link. Modern optimizing compilers rarely use the display mechanism, since procedure calls are heavily used in current programming practice, and must be quite fast. See: "Implications of Structured Programming for Machine Architecture", A.S. Tanenbaum, CACM, March 1978. chip elliott ....decvax!dartvax!chip