comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: When shoul Pragma Inline be used?
Date: Sun, 23 Feb 2003 21:05:08 GMT
Date: 2003-02-23T21:05:08+00:00	[thread overview]
Message-ID: <8Ia6a.229559$HN5.971263@rwcrnsc51.ops.asp.att.net> (raw)
In-Reply-To: pan.2003.02.23.17.26.17.90098@mail.utexas.edu

"Premature optimization is the root of all evil" Donald Knuth

> would probably inline any
> single line procedure or function that gets called a lot.
  Called a lot dynamically.  If it gets called from lots of places, you
will be adding bloat that may have consequences for program load time,
cache misses, etc.  Note also that a "single line" can generate a lot
more code than multiple lines, depending on what the lines do.

> IMO the _right_ way to decide is to profile your program and see which way
> works out the best.
  Agreed.  After the program works correctly, but isn't fast enough.



  reply	other threads:[~2003-02-23 21:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-23 14:33 When shoul Pragma Inline be used? Preben Randhol
2003-02-23 17:26 ` Bobby D. Bryant
2003-02-23 21:05   ` tmoran [this message]
2003-02-23 18:07 ` Jeffrey Carter
2003-02-23 22:00   ` Robert A Duff
2003-02-24  9:29   ` Preben Randhol
replies disabled

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