comp.lang.ada
 help / color / mirror / Atom feed
From: stluka@software.org (Fred Stluka)
Subject: Re: Use pragma INLINE or not? (SUMMARY)
Date: 28 Jun 91 15:09:15 GMT	[thread overview]
Message-ID: <1991Jun28.150915.7269@software.org> (raw)
In-Reply-To: 3398@sparko.gwu.edu

As promised, here is a summary of responses I got via e-mail.


In general the e-mailed responses spanned the same range as 
the posted ones, with most people agreeing that you shouldn't
INLINE unless you are sure you need to.

In a time-critical environment, where you are *sure* of where
the bottlenecks are, then you can probably do a better job
than the compiler.  Otherwise, write all the code without 
INLINE, then use a performance analyzer to determine where to 
add them for maximum effect.

Other points worth mentioning:

  From:  gdfwc3!jesmith@texsun.Central.Sun.COM (Jesse Smith)

     The VAX/VMS Ada 2.1 compiler switch
               /OPTIMIZE=(TIME,INLINE:MAXIMAL)
     made code run 20% faster than just:
               /OPTIMIZE=TIME

  From:  Eric_Alan_Christiansen@cup.portal.com

     INLINE causes problems during development:

          - Obscures code a symbolic debugger, but if disabled
            with a command line switch, causes warnings to be
            generated, obscuring other more relevant messages.

          - Creates dependencies of callers on bodies, not just
            specs, forcing more recompilations.

     Also, inlining is sometimes desired for a routine when called
     by caller A (for speed), but not when called by B (for space
     or for reduction in dependencies).  INLINE applies always or
     never.  Compilers may internally do a better job.

Thanks for the input,
--Fred
-- 
Fred Stluka                               Internet: stluka@software.org
Software Productivity Consortium          UUNet:    ...!uunet!software!stluka
2214 Rock Hill Rd, Herndon VA 22070 USA   Voice:    (703)742-7236

      parent reply	other threads:[~1991-06-28 15:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1991-06-18 17:14 Use pragma INLINE or not? Fred Stluka
1991-06-19  8:58 ` Orville R. Weyrich
1991-06-19 15:15 ` Robert I. Eachus
1991-06-19 15:57 ` Brian Hanafee
1991-06-19 21:51 ` George C. Harrison, Norfolk State University
1991-06-19 23:44 ` Jim Showalter
1991-06-27 16:13   ` Robert Firth
1991-06-27 21:00     ` Michael Feldman
1991-06-28 12:39       ` Kenneth B. Hawks
1991-06-28 17:56         ` Lance E Murray
1991-06-28 15:09       ` Fred Stluka [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox