comp.lang.ada
 help / color / mirror / Atom feed
From: bhanafee@deimos.ads.com (Brian Hanafee)
Subject: Re: Use pragma INLINE or not?
Date: 19 Jun 91 15:57:03 GMT	[thread overview]
Message-ID: <BHANAFEE.91Jun19105703@deimos.ads.com> (raw)
In-Reply-To: stluka@neptune.software.org's message of 18 Jun 91 17:14:59 GMT


In article <1991Jun18.171459.11744@software.org>,
   stluka@neptune.software.org (Fred Stluka) writes:


>   There seem to be 2 schools of thought:
>
>	1)  Don't use it.  Smart compilers will automatically
>	    inline the most appropriate routines.
>
>	2)  Use it.  Compilers aren't that smart yet.
>
>   What do you think?

3) "A pragma is used to convey information to the compiler."  Use it
when you know something about the code that the compiler doesn't know.
In the case of case of pragma INLINE, this shouldn't happen very
often.  It might be appropriate for short library routines (such as
math vector operations) which you might expect to find in hot spots
such as inner loops.
  Generally, pragma ELABORATE (unit_you_want_inlined) followed by
pragma OPTIMIZE (time) in the calling unit is more appropriate.



Brian Hanafee

  parent reply	other threads:[~1991-06-19 15:57 UTC|newest]

Thread overview: 12+ 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 [this message]
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       ` Use pragma INLINE or not? (SUMMARY) Fred Stluka
  -- strict thread matches above, loose matches on Subject: below --
1991-06-20 13:07 Use pragma INLINE or not? Bevin Brett
replies disabled

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