Archived

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

Optimize!

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

Does anyone know any programs that help you optimize something in C++? You know like something that tells you how much time you spend on a loop or how long it takes to do a funcion. Anything would be nice, thank you!

Share this post


Link to post
Share on other sites
Code profilers do exactly this. If you''re using Microsoft Visual C++, I believe most versions have one built in, you should check out the documentation on it. Several code-based profilers are also available for other platforms however, which you can add to your project.

Share this post


Link to post
Share on other sites
quote:
Original post by Wildfire
If you''re using Windows and Visual C++ it''s called ''Profiler''. (Not all version have it though, afaik)


And if you''re using linux with gcc is''t called a profiler also . Does matter what compiler/os you''re using, the name of the tool is a profiler.

Share this post


Link to post
Share on other sites
quote:

And if you''re using linux with gcc is''t called a profiler also . Does matter what compiler/os you''re using, the name of the tool is a profiler.


Yeah, you''re right... the tool is called a profiler. But that doesn''t say it has to be called ''Profiler'' anywhere. I could write a profiler app, and call it ''SpeedAlyser'' if I felt like it, couldn''t I?

Share this post


Link to post
Share on other sites
If you want to bench very accurately some routines called inside loops, I advise you to use the asm instruction RDTSC (available on most PC CPUs). It's the only way to be one clock cycle precise when you code some extremely strategic asm routines.

[edited by - Charles B on November 29, 2003 12:54:27 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by Wildfire
Yeah, you''re right... the tool is called a profiler. But that doesn''t say it has to be called ''Profiler'' anywhere. I could write a profiler app, and call it ''SpeedAlyser'' if I felt like it, couldn''t I?


Yes, but by your own admission, it would still be a profiler, and would therefore most likely be categorized as such wherever it was promoted.

Your opinion is wrong.

Q.E.D.

-ZE


//email me.//zealouselixir software.//msdn.//n00biez.//
miscellaneous links

Share this post


Link to post
Share on other sites