Performance Analysis
In software development, what is the purpose of automatically running benchmarks and recording results on every change?
- ATo make benchmark results identical every time
- BTo add features to the program automatically
- CTo notice quickly when a change degrades performance (a performance regression) and to pinpoint the responsible change
Show answer and explanation
Answer: C. To notice quickly when a change degrades performance (a performance regression) and to pinpoint the responsible change
Small changes accumulating can gradually erode performance without anyone noticing. Running benchmarks under the same conditions on every change and recording results means a slowdown is spotted at once and the responsible change identified immediately. Noticing months later makes it hard to find the cause among many changes. It is also necessary to account for measurement noise and flag only meaningful differences.
- A. Results vary with changes and environment, so they are recorded and compared.
- B. It does not add features.
- C. Correct. Performance must be protected like functionality.