Array indexing vs. pointers...

Mark A. Charette charette at edsews.EDS.COM
Sun Oct 2 11:22:28 AEST 1988


In article <836 at proxftl.UUCP>, bill at proxftl.UUCP (T. William Wells) writes:
> 
> At one time, I spent a lot of my spare time improving other
> people's code.  One of the things I discovered is that almost all
> the code I was dealing with had better than 25% execution time
> fat.  What I mean is that when I merely changed all of the code
> to follow my coding practices (which are not anything special,
> just obvious things that every coder ought to know), it got that
> much better; I am not talking about mere tweaks, nor am I talking
> about optimizing particular sections of code.  I am talking about
> reading each line of code and making obvious changes (things like
> using temporaries when needed, adding appropriate register
> declarations, eliminating obviously unnecessary function calls,
> etc.)
> 
We have 6 million lines of PL/1 code we are porting to workstations, mostly well
written and modular in form. Your methods were used in writing this code
(it was written to take advantage of the IBM 370 architecture). The writers
(many, many writers) were trained in making their algorithms fly while
keeping the code within ANSI bounds. Lots of effort went into analyzing the
object code generated for equivalent algorithms, with the winners (in
execution speed) used for the final programs.


The port looks like its going to be sheer hell on a team of people for the
next two or three years. All the effort taken during the last 12 years to
make the code portable while conscientiously taking advantage of the
underlying architecture has made optimization on a workstation a nightmare.
However, if we limited the programs by keeping them on the mainframes, we
would never reach the productivity gains that we hope to attain.

All things in moderation. (Of course, 6,000,000 lines of code ain't
moderate.)
-- 
Mark Charette                   "On a clean disk you can seek forever" - 
Electronic Data Systems                  Thomas B. Steel Jr.
750 Tower Drive           Voice: (313)265-7006        FAX: (313)265-5770
Troy, MI 48007-7019       charette at edsews.eds.com     uunet!edsews!charette 



More information about the Comp.lang.c mailing list