[om-list] When not to optimize

Mark Butler butlerm at middle.net
Wed Mar 13 09:33:05 EST 2002


Thomas and Megan Packer wrote:
> 
> I like this so far (four paragraphs, and reading...).  Do you know if
> there's a "program counter sampling performance tool" for VC++/dev-studio?
> This seems very useful.  Or, how would you go about gathering the same type
> of information without such a tool?
> 
> tomp

A program counter sampling performance tool belongs to a class of programs known as  profilers. I would be very surprised if Visual C++ doesn't come with one.

Alternatively, you can instrument your program by hand with macros at the start and end of functions that you are interested in that measure the elapsed time inside a function. That is a lot of work without more special tools if you want to measure a large number of functions.

Most people just run benchmarks on their programs with different data sets and correlate the results to get and idea of which functions consume the most time.

- Mark




More information about the om-list mailing list