Skip to Main Content
Programming Pearls, 2nd Edition
book

Programming Pearls, 2nd Edition

by Jon Bentley
September 1999
Intermediate to advanced content levelIntermediate to advanced
256 pages
7h 38m
English
Addison-Wesley Professional
Content preview from Programming Pearls, 2nd Edition

Appendix 4: Rules for Code Tuning

My 1982 book Writing Efficient Programs was built around 27 rules for code tuning. That book is now out of print, so the rules are repeated here (with only a few small changes), together with examples of how they are used in this book.

Space-For-Time Rules

Data Structure Augmentation. The time required for common operations on data can often be reduced by augmenting the structure with extra information or by changing the information within the structure so that it can be accessed more easily.

In Section 9.2, Wright wanted to find nearest neighbors (by angle) among a set of points on the surface of the globe represented by latitude and longitude, which involved expensive trigonometric operations. Appel augmented ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

The Practice of Programming

The Practice of Programming

Brian W. Kernighan, Rob Pike
The Programmer's Brain

The Programmer's Brain

Felienne Hermans
Programming Interviews Exposed, 4th Edition

Programming Interviews Exposed, 4th Edition

John Mongan, Noah Suojanen Kindler, Eric Giguere
Programming Rust, 2nd Edition

Programming Rust, 2nd Edition

Jim Blandy, Jason Orendorff, Leonora F. S. Tindall

Publisher Resources

ISBN: 9780134498058Purchase book