hes@ecsvax.UUCP (Henry Schaffer) (04/28/85)
<> We've had alot of discussion on assembler vs. HOL, and considerations of both speed and memory efficiency. Some of the arguments have arisen because we are not always interested in optimizing the same things. I have recently gone through a book which deals with many of these issues. This book discusses a number of situations in which it is desireable to trade off good structure to gain an improvement in speed or space used, and then goes through many techniques to gain these improvements (and to trade them off against each other.) A total of 27 "Rules" are given, and explained at length including examples and timings, in the following categories: Modifying Data Structures Trading Space-for-time- 4 rules Trading Time-for-space- 2 rules Modifying Code Loops- 6 rules Logic- 5 rules Procedures- 5 rules Expressions- 5 rules To give an idea of the types of rules- here are the first 3 Loop rules: 1. Code motion out of loops 2. Combine tests 3. Loop unrolling The book is: WRITING EFFICIENT PROGRAMS by Jon Louis Bently 1982 Prentice-Hall, Inc., Englewood Cliffs, NJ 170 pages --henry schaffer n c state univ