When to do inline expansion

jhall@whale.WPI.EDU (John Clinton Hall)
Tue, 14 Sep 1993 17:34:39 GMT

          From comp.compilers

Related articles
When to do inline expansion jhall@whale.WPI.EDU (1993-09-14)
Re: When to do inline expansion zstern@adobe.com (1993-09-20)
Re: When to do inline expansion salomon@silver.cs.umanitoba.ca (1993-09-20)
Re: When to do inline expansion davidm@questor.rational.com (1993-09-20)
Re: When to do inline expansion jfc@athena.mit.edu (1993-09-21)
Re: When to do inline expansion jgmorris+@cs.cmu.edu (1993-09-21)
Re: When to do inline expansion jdean@bergen.cs.washington.edu (1993-09-21)
[7 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers
From: jhall@whale.WPI.EDU (John Clinton Hall)
Keywords: optimize, question
Organization: Worcester Polytechnic Institute
Date: Tue, 14 Sep 1993 17:34:39 GMT

How long should a function be (in number of statements) for it to be a
reasonable speed optimization to perform inline expansion? (For
simplicity, let's assume that the function is only called once
throughout the code, and the source language is C.) Obviously, a
function with 100 statements should not be expanded; however, a
function with only 1 statement should be expanded inline.


My guess is that executing 3 to 5 statements would equal the time it
would normally take to set up the call, perform the call, and clean up
after the call. Comments?
--
jhall@wpi.wpi.edu
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.