Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!tut.cis.ohio-state.edu!pt.cs.cmu.edu!MATHOM.GANDALF.CS.CMU.EDU!lindsay From: lindsay@MATHOM.GANDALF.CS.CMU.EDU (Donald Lindsay) Newsgroups: comp.arch Subject: Re: Inlining subroutines at link time Message-ID: <9804@pt.cs.cmu.edu> Date: 4 Jul 90 02:48:03 GMT References: <1990Jul3.194348.21178@msuinfo.cl.msu.edu> Organization: Carnegie-Mellon University, CS/RI Lines: 17 In article <1990Jul3.194348.21178@msuinfo.cl.msu.edu> riordanmr@clvax1.cl.msu.edu (Mark Riordan) writes: >Modules with inlined >subprograms are larger, yet they execute faster because they avoid >call and return instructions, which increase execution time. Actually, the win (when there is a win) comes from the direct binding of the arguments, which avoids the call site having to gather together copies/pointers. A result can be computed directly into its target, avoiding a copyback. Also, the inlined routine's locals are merged into the caller's locals, saving the stack manipulation. The architectural tie-in is that inlining disturbs the statistical properties of programs, increasing the number of registers used, enlarging the code, and affecting its locality. -- Don D.C.Lindsay