Skip to content

Latest commit

 

History

History
13 lines (10 loc) · 977 Bytes

File metadata and controls

13 lines (10 loc) · 977 Bytes

Rules for Building High-Performance Code

Rules for creating high-performance software:

  1. Know where you’re going (understand the objective of the software).
  2. Make a big map (have an overall program design firmly in mind, so the various parts of the program and the data structures work well together).
  3. Make lots of little maps (design an algorithm for each separate part of the overall design).
  4. Know the territory (understand exactly how the computer carries out each task).
  5. Know when it matters (identify the portions of your programs where performance matters, and don’t waste your time optimizing the rest).
  6. Always consider the alternatives (don’t get stuck on a single approach; odds are there’s a better way, if you’re clever and inventive enough).
  7. Know how to turn on the juice (optimize the code as best you know how when it does matter).