appropriate optimization technology

David Hough uunet!Eng.Sun.COM!David.Hough
Mon May 18 14:52:19 PDT 1992


There's been interesting exchanges on the numeric-interestavalidgh.com
mailing list about the optimization issues I raised a couple of weeks ago
with respect to loops like

      while (tmp == zero) {
         a = a+a;
         tmp = a+one;
         tmp1 = tmp-a;
         tmp = tmp1-one;
      }

Regardless of what one thinks about language standards, arithmetic standards,
or standard mathematical software, it must be alarming that so much effort
is going into optimizations that do so little good for performance.   
Perhaps this is part of
the open systems phenomenon; independent compiler developers often want to
maximize their investment in "portable" optimizations that will serve them on
a variety of platforms.   This is ultimately less productive than thinking
about problems which have their portable aspects but ultimately must be
calibrated to specific target machines:

* "vertical" optimization of memory hierarchy latencies within one processor

* "horizontal" optimization of parallelism within functional units of one 
processor, and across several processors sharing memory, and across many
processors with private memory

* "feedback" optimization based on run-time data in order to focus optimization
effort on the very small part of most realistic applications where it does
any good

* "load-time" optimization to adapt to new hardware or shared libraries
whose implementations weren't known at compile time

It doesn't help much that the existing mathematical software languages -
mainly Fortran-77, and to a lesser extent ANSI-C - don't provide a lot of
language support for the foregoing.   They don't even support calling each
other!

Since multiprocessing desktop workstations are, uh, imminent, I would think
that most compiler optimization specialists would be intensely interested in
certain aspects of the NCEG activities, particularly the array syntax 
extensions subgroup.   I have not been active in that very contentious 
subgroup, but I get the impression that a lot of the contention is over how
language features should be designed to facilitate writing optimal and
optimizable programs for a variety of architectures.   I'll leave it to the
protagonists to say more if they are so inclined.



More information about the Numeric-interest mailing list