Jump to content
  • Advertisement
Sign in to follow this  
Asheh

Code Profiling

This topic is 3472 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!