Performance engineering is the practice of making software use less time, memory, energy or bandwidth, guided by measurement rather than guesses. Most programs spend nearly all their time in a small part of the code, so the skill is finding that part, understanding why it is slow and changing the right thing.
Key concepts
- Measure first: profile before changing anything; intuition about bottlenecks is often wrong.
- Algorithms and data structures: a better complexity class beats any amount of tuning.
- Memory hierarchy: caches mean access patterns matter; contiguous, predictable data is fast.
- Concurrency and parallelism: using several cores helps only when work divides and contention is low.
- Latency and throughput: how long one request takes, versus how many are done per second.
Vocabulary
- Profiler: a tool that shows where a program spends time or memory.
- Hot path: the code run most often or longest.
- Cache miss: an access that has to go to slower memory.
- Amdahl's law: the limit that the serial part of a task puts on speed-up from parallelism.
What to study, in order
- Complexity analysis and how to read a profile and a flame graph.
- Profile a slow program of your own, find its top cost, fix it and re-measure.
- Rewrite a loop for cache-friendly access and measure the difference.
- Learn the system's counters and tracing tools to see CPU, memory, disk and network use.
- Parallelise a task, then find where contention or waiting limits the gain.
Related tags
#performance-evaluation #algorithms #computer-architecture #web-performance #observability