Code Profiling

Started by
0 comments, last by ndwork 15 years, 4 months ago
Im writing a basic code profiler currently it can take a function and time it using high performance counters. The problem is even though I have these times I dont really have anything to compare them to, so they actually mean very little in terms of execution time. I understand that Ill probably need to develop somthing which takes a higher function, then profiles the functions under it as a percentage of that function so I can see which functions are taking up the most time within certain functions. Unfortunatly Im unsure of a good way of going about doing this. I dont particulaly want to spend weeks developing an amazing profiler, but I could use an idea which helps me develop my current working version further and provide me with more useful information. Cheers all. Ash.
Advertisement
Profiling with the amount of time the code takes is problematic. Code may take more or less time based on the CPU power that the code is given by the operating system.

A better way is to profile using CPU cycles. There's a library called FFTW (Fastest Fourier Transform in the West). This library includes functions to count the number of CPU cycles code has taken. You can get this library at www.fftw.org.

Good luck!

This topic is closed to new replies.

Advertisement