performance = less hardware required, happier users

generally, performance ~ execution time

measured by

there is a trade-off between efficiency of code (using efficiency ‘tricks’ etc.) and understandability of code

best development strategy: first, make the program simple, clear, robust, correct… then worry about efficiency… if it’s a problem at all

whilst theoretical complexity analysis gives some idea of performance, the best way is still to measure program execution

coarse-grained = overview of performance characteristics

fine-grained = detailed description of performance

gprof — a profiler

the gprof command displays execution profiles

compile program with the -pg flag

executing the program will cause a gmon.out file to be produced

gprof will read gmon.out and print profile on stdout