Advertisement

Profiling in C++ Builder

Started by December 13, 2000 06:15 PM
1 comment, last by MicahJon 24 years, 1 month ago
As anyone who''s seen my post before knows I like fast code and have asked the ever present "which is faster" questions before. I''d love to profile these things myself, in fact I need to profile these things myself, but profiling for me isn''t simple. C++ Builder has not built in profiler. Does anyone have any good suggestions on how I can profile my code? Techniques, links to articles, cheap software (I just took a 10% pay cut until our company "breaks even"...) Right now I look at my code, and use the old fashioned "I''m Here" messages to determine which routines are used the most. I then take segments of code off on their own, loop them 50 million times, and time them with (shudder) GetTickCount(). Anyhow, thanks for any help, Micah
Nope, this is were C++Builder is lacking . I haven''t found anything remotely resembling a profiler (integrated of course). There was one for Delphi, but it would only work with Delphi code (otherwise it was usable w/ C++Builder).
Well, I suppose we could use the more exact QueryPerformanceCounter() function which is more accurate, then using just GetTickCount().

------------------------------
BCB DX Library - RAD C++ Game development for BCB
Advertisement
Hmm. I wrote a simple timing object using GetTickCount. Maybe I''ll dig that out, replace it with one that uses the performance timer, add in some instance counting and function tracking, have it spit out a little report, and end up with my own profiling library... It may not be perfect, but at least it might give me more info than I have now.

Thanks,
Micah

This topic is closed to new replies.

Advertisement