Pete Salzman asked about optimizing a loop in terms of execution speed,
by having the loop index go from high value to low instead of vice
versa.  Some discussion ensued in terms of what machine instructions a
compiler could take advantage of in this manner.

One point that you might consider, Pete, is that these considerations
are kind of nickel-and-dime in comparison to things like memory
hierarchy issue.  There is much better payoff potential in writing code
in such a way as to minimize cache misses, which cause major time
penalties, and page faults, which cause catastrophic time penalties.

There is even a book on this, I believe in the Intel Press series.

Norm

_______________________________________________
vox-tech mailing list
[email protected]
http://lists.lugod.org/mailman/listinfo/vox-tech

Reply via email to