Abstract :
Practical performance improvement of a complex program must be guided by empirical measurements of its resource usage in order to avoid wasting programmer time and to avoid needlessly destroying the original, clear structure. Previous approaches to measuring programs, while very useful, have shortcomings in that they provide either too little or too much information. In this paper, I classify previous approaches, explain their strengths and weaknesses, and describe a new approach, call path profiling, that reports resource usage of subroutine calls in their full lexical contexts. This relates resource usage directly to design decisions, providing better guidance to the optimizer. I also discuss the implementation of cpp, a working prototype that operates on Common Lisp programs.