Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.

The Beholder

Optimizing functions

This topic is 5819 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

I am about to start optimizing my code for a game, function by function. The thing is: I would like to see how much CPU-time each function/block of code requires. I am using VC++ 6, so I am wondering whether there is a built-in tool in VC++ that can keep track of the processor load in separate code segments, CPU-instructions per function and maybe how much RAM is consumed. If there isn''t a tool for VC++, is there a program (preferably free)that can do these things? (I think I''ve heard of such) Thanks in advance, Gustav

Share this post

Link to post
Share on other sites
What you need is a profiler. There is a shitty one in VC6 that will tell you things like how many milliseconds were spent in the function etc, but it only tells you at the end of execution.

I've written an article at flipcode that works at a more granular level but is frame aware so will tell you whats happening on a frame by frame basis.

Some links:

Article : Here

Screenshots of it in my game : Here

(Top Right corner shows the results, the GUI is my engine however)


Chris Brodie

[edited by - gimp on August 16, 2002 9:01:21 AM]

[edited by - gimp on August 16, 2002 9:02:14 AM]

Share this post

Link to post
Share on other sites
What you need is a profiler.

There''s one in Visual C++ (Build - Profile...) but I''ve not used it much so I can''t vouch for it. There''s also a trial version of Intel''s VTune on their site which is very good once you get used to it.

Helpful links:
How To Ask Questions The Smart Way | Google can help with your question | Search MSDN for help with standard C or Windows functions

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!