To look up algorithms, see also Appendix 1 (A Catalog of Algorithms). To look up code-tuning techniques, see also Appendix 4 (Rules for Code Tuning).
Abrahams, P. W. viii
abstract data types 27, 29, 130, 133β142, 152β155, 158
Adriance, N. vii
Aho, A. V. vii, 8, 86, 159, 178, 207, 213
algorithm design vi, 11β20, 62, 64, 77β86, 91, 115β122, 127β129, 131, 149β157
algorithms, divide-and-conquer 62, 79β81, 84β85, 116
algorithms, multiple-pass 4β5, 7, 207
algorithms, numerical 182
algorithms, randomizing 13, 120
algorithms, selection 18, 123, 181, 212, 223
algorithms, string 15β16, 18β20, 98, 123, 144β146, 161β173, 182, 219, 230β231
algorithms, vector 182
allocation, dynamic 105
analysis, retrograde 110
Apple Macintosh 107
arrays 12, 22β23, 25β27, 29, 33β55, 77β86, 91, 100β103, 105, 115β125, 135β138, 142β143, 148, 153, 197, 201β202
arrays, cumulative 79, 84, 203, 217
back of the envelope 9, 15, 25, 62, 64, 67β76, 78, 127, 145, 176, 183β184
background data 3, 15, 18, 25, 87, 125, 144, 176
bags, paper 127
Baird, H. S. vii
Basic 127
Bell, C. G. 65
Bentley, D. T. viii
Bentley, J. C. 125
Berecz, V. 98
binary search 12β13, 16, 18, 33β55, 92β95, 97β98, 170β172, 181, 201, 203β204, 208β209, 213β214, 219, 230
binary search trees 13, 138β140, 164, 171, 181, 198
binary trees, implicit 148
Bitmap Sort 5β8, 140β141, 180, 205β207
bitmaps 5β8, 13, 140β141, 145, 199, 207
blocks, conceptual 3, 9, 21β26, 92
Boolean Variable Elimination 193
bounds, lower 84β85, 204, 217
Boyer, R. S. 85
Bridge, Brooklyn 72
Bridge, Tacoma Narrows 72
Brooklyn Bridge 72
Brooks, F. P., Jr. v, 29, 99β100, 109β110, 220
bugs, performance 72, 89, 91, 119
Butler, S. 166
Buzen, J. P. 73
C 19, 45β55, 87β95, 97, 121, 123β125, 171β172, 177, 206, 224, 231
C++ 27, 45, 90, 121, 123β124, 127, 133β143, 158, 171β172, 177, 185, 197β200, 206, 214, 224, 231
C Standard Library 19, 122, 177, 205, 219
C++ Standard Template Library 121β122, 128, 134, 142, 159, 161β162, 164, 172, 177, 197, 205β206, 219, 230
cache-sensitive code 17, 89, 105, 107, 109, 137, 139, 142, 211, 214
Caching 191
calculators 28
canonical forms 16
Cargill, T. A. 16
character classification 98, 219
children 76
Childress, G. L. viii
classification, character 98, 219
Cleveland, W. S. vii
Cobol 25
code, cache-sensitive 17, 89, 105, 107, 109, 137, 139, 142, 211, 214
Code Motion Out of Loops 192
code tuning 62, 64β65, 87β98, 116, 120β122, 142
coding style 33, 45, 54β55, 130β131, 155, 177, 214
Coffee Can Problem 42
Collapsing Function Hierarchies 193
collection, garbage 105
Combining Tests 192
common divisors, greatest 17, 209β210
Common Subexpression Elimination 195
Compile-Time Initialization 194
conceptual blocks 3, 9, 21β26, 92
Condon, J. H. 110
contract, programming by 40
Cormen, T. H. 86
Coroutines 194
correctness proofs see program verification cost models 70β72, 75, 89, 92, 107β108, 185β189
Coughran, W. M. 178
Coupon Collectorβs Problem 204, 224
cumulative arrays 79, 84, 203, 217
data, background 3, 15, 18, 25, 87, 125, 144, 176
data structures see arrays, bitmaps, dictionaries, hashing, heaps, linked lists, matrices, priority queues, search, sparse arrays, trees, vectors
data structures, sparse 100β104
data transmission 9, 74, 99, 103β104, 215
datatypes, abstract 27, 29, 130, 133β142, 152β155, 158
databases 4, 9, 24, 28β29, 64, 72, 110, 161
date functions 26, 30, 109, 212
de Saint-Exupery, A. 7
debugging 12β13, 15, 41, 47β50, 54β57, 72, 87, 117β118, 131, 139
Denning, P. J. vii, 73β75, 216
Dershowitz, N. 213
design, algorithm vi, 11β20, 62, 64, 77β86, 91, 115β122, 127β129, 131, 149β157
design levels 59, 61β66, 92, 96, 122
design process 7, 17, 31, 64β65, 67, 72, 83, 100, 106, 129, 144, 175
design space 4β5, 108, 123, 127β130, 145, 176
dictionaries 11, 15, 18β20, 26, 31, 109, 144β146, 161β164, 209
difficentralia 167
Dijkstra, E. W. 144
dimension tests 68
displays, seven-segment 31
divide-and-conquer algorithms 62, 79β81, 84β85, 116
divisors, greatest common 17, 209β210
Dobkin, D. 217
domain-specific languages 28β29
Dromey, R. G. 219
Duncan, R. 178
duplicated substring, longest 165β166, 231
dynamic allocation 105
Ecuador 56
Einstein, A. 74
elegance 6β7, 9, 14β15, 20, 24β25, 65, 68, 81, 92, 99β100, 118, 127, 145, 157, 161, 169, 176, 216, 225
engineering techniques see back of the envelope, background data, debugging, design, elegance, problem definition, prototypes, specifications, testing, tradeoffs
English 11, 15, 18β20, 26, 30, 109, 144β146, 161β173
equivalence relations 16
experiments 8, 17, 51β53, 82, 89, 95β96, 98, 116, 119, 121, 137, 162, 164, 185β189, 206, 210, 214, 221, 230
Exploit Algebraic Identities 193β194
Exploit Common Cases 194
exponentiation 43
Fermi, E. 75
Fermi problems 75
Fibonacci numbers 1β3, 5, 8, 13, 21, 34, 55, 89, 144
fingerprints 16
Floyd, R. W. 129, 143, 225β226
forms, canonical 16
Fortran 102
Fraser, A. G. 178
functions, date 26, 30, 109, 212
functions, trigonometric 91
Galloping Gertie 72
garbage collection 105
Gardner, M. 11
Garey, M. R. vii
genetic traits 91
Gibbon, P. 61
Gordon, P. viii
graphical user interfaces 28, 55, 106, 202
greatest common divisors 17, 209β210
Grenander, U. 83
Gries, D. vii, 14, 42β43, 210, 217
harness, test 46
hashing 98, 145, 162β164, 171, 181, 201, 207, 221
Hayes, B. 213
Heapsort 155β159, 180, 204, 229
Holmes, S. 168
Homer 166
HTML 28
Huff, D. 75
Hume, A. G. vii
hyphenation 30
Iliad 166
implicit binary trees 148
infinite loops 48
Insertion Sort 115β116, 121, 179, 214
integer remainders 88
interfaces, graphical user 28, 55, 106, 202
interpreters 24, 106β107, 192
Inventorβs Paradox 29
Jackson, M. A. 9
Jacob, M. 118
Java 45, 54, 123β124, 171, 202, 224
Jones, A. K. 63
Juno 166
Kadane, J. B. 83
Kentucky legislature 100
Kernighan, B. W. viiβviii, 3, 15, 26, 55, 76, 105, 107, 159, 171, 178, 187, 213β214, 226
Kernighan, M. D. viii
key-indexing search 7, 102, 104, 181, 201, 207
Knuth, D. E. 3, 16, 34, 72, 96, 123, 126β129, 131β132, 150, 159, 228
Koestler, A. 127
Kolmogorov, A. M. 72
Lagarias, J. C. 213
Lampson, B. W. 66
languages, domain-specific 28β29
languages, programming see Awk, Basic, C, C++, Cobol, Fortran, Pascal, Smalltalk, Tel, Visual Basic
Lazy Evaluation 192
legislature, Kentucky 100
Lehman, A. S. 76
Lehman, N. V. 76
Leiserson, C. E. 86
Lesk, M. E. 18
levels, design 59, 61β66, 92, 96, 122
Library, C Standard 19, 122, 177, 205, 219
Library, C++ Standard Template 121β122, 128, 134, 142, 159, 161β162, 164, 172, 177, 197, 205β206, 219, 230
light bulbs 18
Linderman, J. P. viiβviii, 221
Lindholm, T. 124
linked lists 15, 88, 101, 136β138, 142β143, 145, 198, 226
Lipton, R. J. 217
lists, linked 15, 88, 101, 136β138, 142β143, 145, 198, 226
Little, J. C. R. 73
lobsters 76
Lomet, D. B. 98
longest duplicated substring 165β166, 231
look at the data see background data
Loop Fusion 193
loops, infinite 48
lower bounds 84β85, 204, 217
Lynn, S. vii
Macintosh, Apple 107
Maguire, S. 50
Mahaney, S. R. 230
maintainability 6β7, 22, 29, 65β66, 87β88, 92, 94, 96, 102, 107, 142
malloc 70, 87, 97, 101, 189, 218β219, 227
managers 59
Markov chain 168
Markov text 167β173, 204, 231
Martin, A. R. viii
matrices 18, 85, 100β105, 182
maximum subsequence problem 77β86
McConnell, S. v, viii, 31, 55, 98, 214, 216
McIlroy, M. D. viiβviii, 14, 26, 42, 108, 123, 144β146, 172, 222
McIlroy, P. M. viii
Melville, R. C. vii
Minerva 166
models, cost 70β72, 75, 89, 92, 107β108, 185β189
monitors see profilers
monkeys 167
Moore, J S. 85
multiple-pass algorithms 4β5, 7, 207
Munro, J. I. 230
Musser, D. R. 209
Narasimhan, S. viii
need for speed 60
needlessly big programs 3, 21β31, 106, 130
new operator 70, 135β143, 155, 185β186, 227
Newell, A. 63
Nievergelt, J. 96
nightspots, popular 73
Nixon, R. M. 144
numbers, prime 103
numbers, random 120, 125β126, 130, 189, 224
numerical algorithms 182
Olympic games 67
Oppenheimer, R. 75
optimization, premature 96
Packing 192
Pairing Computation 195
paper bags 127
Paradox, Inventorβs 29
Parallelism 194
Parnas, D. L. 27
partitioning functions 116β123, 221
Pascal 214
Paulos, J. A. 75
pencils 208
Penzias, A. A. vii
performance bugs 72, 89, 91, 119
performance requirements 4, 14, 67, 91
permutations 15
Pfalzner, S. 61
pigeons 208
Pike, R. viii, 55, 107, 171, 178, 214, 226
ping 72
Pinkham, R. 76
pointer to a pointer 227
popular nightspots 73
portability 29
postconditions 40
Potter, H. 76
Precompute Logical Functions 193
preconditions 40
premature optimization 96
prime numbers 103
priority queues 152β155, 159, 181, 230
Problem, Coffee Can 42
problem definition 3, 6, 17, 29, 63, 83, 99β100, 125, 127, 129, 144β145, 176
problem, maximum subsequence 77β86
problem, substring searching 164
process, design 7, 17, 31, 64β65, 67, 72, 83, 100, 106, 129, 144, 175
profilers 62, 87β88, 96β97, 108β109
program verification vi, 33β44, 84, 92β95, 117β120, 147β157
programmer time 3, 6, 63, 66, 87β88, 92, 102, 105, 116, 130, 142
programming by contract 40
programming languages see Awk, Basic, C, C++, Cobol, Fortran, Pascal, Smalltalk, Tel, Visual Basic
programs, needlessly big 3, 21β31, 106, 130
programs, reliable 7, 65, 73, 215
programs, robust 7β8, 50, 65, 99, 120, 143
programs, subtle 14, 34, 81, 94, 116, 120, 127, 144β146
prototypes 6, 17β18, 46β55, 127, 130, 176
Public, J. Q. 23
qsort 19, 121β122, 166, 170, 172, 177, 205β206
queues 73
queues, priority 152β155, 159, 181, 230
quick tests 68
Quicksort 4, 116β123, 156, 179, 203, 223
Quito 56
random numbers 120, 125β126, 130, 189, 224
random samples 125
random sets 8, 103, 125β143, 182, 206, 224β228
randomizing algorithms 13, 120
records, variable-length 105
recurrence relations 30, 81, 85
Reddy, D. R. 63
relations, equivalence 16
reliable programs 7, 65, 73, 215
remainders, integer 88
Reordering Tests 193
Report Program Generator 28
requirements, performance 4, 14, 67, 91
retrograde analysis 110
reversal, vector 14
Ricker, M. E. viii
Rivest, R. L. 86
robust programs 7β8, 50, 65, 99, 120, 143
Roper, M. J. vii
rotation, vector 11, 13β15, 17, 209β211
RouechΓ©, B. 57
rules of thumb 15, 65, 69β70, 74, 96, 125, 130, 176, 178, 214
run time 6, 8, 12, 17β18, 51β55, 59, 62, 70β72, 82, 87β98, 116, 119, 121, 128, 137, 162, 164, 187β189, 206, 210, 214, 221, 230
Saini, A. 209
samples, random 125
Scholten, C. 42
Schryer, N. L. 178
search, binary 12β13, 16, 18, 33β55, 92β95, 97β98, 170β172, 181, 201, 203β204, 208β209, 213β214, 219, 230
search, key-indexing 7, 102, 104, 181, 201, 207
search, sequential 12, 18, 43, 90β91, 96, 98, 102, 145β146, 153, 180, 201
search trees, binary 13, 138β140, 164, 171, 181, 198
searching problem, substring 164
Sedgewick, R. 121β122, 124, 159, 221
selection algorithms 18, 123, 181, 212, 223
sentinels 90, 98, 135β137, 141, 143, 227
sequential search 12, 18, 43, 90β91, 96, 98, 102, 145β146, 153, 180, 201
sets, random 8, 103, 125β143, 182, 206, 224β228
seven-segment displays 31
Shepherd, A. 129
Short-Circuiting Monotone Functions 193
site, web vi
Skinger, L. vii
Smalltalk 27
Smith, C. M. viii
software engineering see engineering techniques
Sort, Bitmap 5β8, 140β141, 180, 205β207
sort functions, system 3, 7, 19, 72, 115, 121, 211
Sort, Heap see Heapsort
Sort, Insertion 115β116, 121, 179, 214
Sort, Quick see Quicksort
Soundex 16
space see squeezing space
space, design 4β5, 108, 123, 127β130, 145, 176
sparse data structures 100β104
specifications 4, 33, 64, 125β126, 133β135, 150β153
speed, need for 60
spots, popular night 73
squeezing space 3, 5, 8, 11, 14, 22, 70, 99β111, 128, 144β146, 156
Stanat, D. F. vii
Standard Library, C 19, 122, 177, 205, 219
Steele, G. L., Jr. 95
Steier, R. vii
Store Precomputed Results 191
string algorithms 15β16, 18β20, 98, 123, 144β146, 161β173, 182, 219, 230β231
Stroustrup, B. vii
structures, sparse data 100β104
substring, longest duplicated 165β166, 231
substring searching problem 164
subtle humor 21
subtle programs 14, 34, 81, 94, 116, 120, 127, 144β146
symmetry 14, 26, 36, 38, 80, 93, 103, 105, 110β111, 117, 120, 123, 138β139, 153, 156, 176β177, 201
system sort functions 3, 7, 19, 72, 115, 121, 211
Szymanski, T. G. viii
table lookup see search
Tacoma Narrows Bridge 72
telephones 3β4, 8, 17, 104β105, 144, 207, 211
termination 37, 39β40, 49β50, 118β119, 202, 213
test harness 46
testing 8, 20, 22, 33, 41, 46β54, 65, 72, 87, 103
tests, quick 68
text, Markov 167β173, 204, 231
Thompson, K. L. 15, 99, 110β111
time, programmer 3, 6, 63, 66, 87β88, 92, 102, 105, 116, 130, 142
time, run 6, 8, 12, 17β18, 51β55, 59, 62, 70β72, 82, 87β98, 116, 119, 121, 128, 137, 162, 164, 187β189, 206, 210, 214, 221, 230
Toyama, K. viii
tradeoffs 7β8, 103, 105, 108, 153, 176, 221
Transfer-Driven Loop Unrolling 193
Transformations on Recursive Functions 194
transmission, data 9, 74, 99, 103β104, 215
trees, binary search 13, 138β140, 164, 171, 181, 198
trees, implicit binary 148
Trickey, H. viii
trigonometric functions 91
turnpikes 85
Ulysses 166
Unconditional Branch Removal 193
user interfaces, graphical 28, 55, 106, 202
Van Wyk, C. J. vii-viii, 87β88, 96β97, 124, 143, 187, 218
variable-length records 105
vector algorithms 182
vector reversal 14
vector rotation 11, 13β15, 17, 209β211
vectors see arrays
verification, program vi, 33β44, 84, 92β95, 117β120, 147β157
voice synthesizer 26
Vyssotsky, V. A. vii, 18, 72β73, 95, 131, 178, 201
web site vi
Weide, B. W. 73
Weinberger, P. J. 68, 159, 213
wine cellars 74
Wolitzky, J. I. 75
Woronow, A. 129
Wright, M. H. 91
Wulf, W. A. 215
Yeager, C. 6
18.117.158.165