Writing Efficient ProgramsClassic on practical methods of optimizing programs: This book gives practical advice on improving the efficiency (optimizing) programs and the limits there of. While showing how to trade off speed for space or vice-versa, the author points out the limits that can be expected to gain. His list of techniques is a collection of practical approaches rather than theoretical possibilities. At 158 pages (not counting index) this book is eminently readable, accessable and useful. Clearly written and well organized this is a book to keep on your shelf for when a program needs improving. It is also a book to read before a program as a reminder not to make things complicated with optimization that aren't needed. |
From inside the book
Results 1-3 of 43
Page 146
... run time from over a week to less than two hours . Space - For - Time Rule 3 - Caching : Data that is accessed most ... reduced the access cost from 2004 instructions to 4 instructions in 99 % of the queries . • Chris Van Wyk's storage ...
... run time from over a week to less than two hours . Space - For - Time Rule 3 - Caching : Data that is accessed most ... reduced the access cost from 2004 instructions to 4 instructions in 99 % of the queries . • Chris Van Wyk's storage ...
Page 148
... reduced by unrolling the loop . ( Page 56. ) • Unrolling a loop to sum an array of ten real numbers reduced the run time from 63.4 microseconds to 22.1 microseconds . • Unrolling the loop of a sequential search reduced its time from 4.1 ...
... reduced by unrolling the loop . ( Page 56. ) • Unrolling a loop to sum an array of ten real numbers reduced the run time from 63.4 microseconds to 22.1 microseconds . • Unrolling the loop of a sequential search reduced its time from 4.1 ...
Page 150
... reduced by rewriting procedures in line and binding the passed variables . ( Page 75. ) • Rewriting the distance procedure in line reduced the run time of Fragment A4 from 21.2N2 microseconds to 14.0N2 microseconds . • Dennis Ritchie ...
... reduced by rewriting procedures in line and binding the passed variables . ( Page 75. ) • Rewriting the distance procedure in line reduced the run time of Fragment A4 from 21.2N2 microseconds to 14.0N2 microseconds . • Dennis Ritchie ...
Other editions - View all
Common terms and phrases
Algebraic Identities application array ArrPtr assembly code assembly language Bell Telephone Laboratories binary search BITBLT Bob Sproull boolean variable cache chapter CloseDist Computer Science coroutines cost data structures decrease described design levels element evaluation executed Expression Rule factor faster Fibonacci FORTRAN Fragment A9 function goto Hamburg Pascal high-level language implemented increase the speed inner loop input insertion sort instance instruction integer iteration Kernighan Knuth lazy evaluation log2 Logic Rule Loop Rule loop unrolling machine code memory ment microseconds modify node optimizations Pascal Pascal compiler Pascal program percent performance Plauger Precomputed Private communication problem procedure call Procedure Rule Quicksort real numbers recursive reduced the run routine Section sentinel sequential search shown in Fragment simple space Space-For-Time Rule speedup Sproull statement storage stored subroutine system-dependent efficiency techniques ThisDist Time-For-Space Rule transformations usually vector words writing efficient code