comp.lang.ada
 help / color / mirror / Atom feed
From: mfeldman@seas.gwu.edu (Michael Feldman)
Subject: Re: Use pragma INLINE or not?
Date: 27 Jun 91 21:00:25 GMT	[thread overview]
Message-ID: <3398@sparko.gwu.edu> (raw)
In-Reply-To: 27847@as0c.sei.cmu.edu

In article <27847@as0c.sei.cmu.edu> firth@sei.cmu.edu (Robert Firth) writes:

  [discussion of execution profiling]
>
>All my guesses together accounted for 6% of the time. The number
>one time sink was a search loop that I'd stupidly written the wrong
>way round - the item being looked for was usually near the end of
>the list rather than near the beginning.  Who would have believed
>that mattered for a list of maximum length 18?  I reversed the
>search and saved almost 20% of the time.

Thanks for being courageous enough to admit this. Most of us have had
similar experiences. In the end, fixing your algorithm paid off far
better than micro-tweaking. 

My students come from all walks of life, including many industry folks.
Sometimes it's very hard to convince the latter (especially, sadly, the
C hackers among them), that no amount of micro-tweaking can turn an
N**2 program into an N log N program. To do the latter requires at
least minimal background in algorithms. Too many students bitch about
having to study that "irrelevant stuff." And with all the chatter I read
about "software engineering education," I see very little in those
quarters about the importance of algorithm analysis and theory. People
have suggested we should drop it from our curriculum in favor of heavier
emphasis on confiugration management. Figure that out.

'Course no amount of algorithm theory could substitute for a careful
analysis of the properties of the data you really expect to see, as you
discovered, Robert. Thanks for a good perspective on the subject!

Mike

  reply	other threads:[~1991-06-27 21:00 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
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 [this message]
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