|
-
February 19th, 2002, 05:02 PM
#1
Speed and memory: Hot to Measures?
Hi all,
I have a function. How do I measure:
1) how fast that function works on my processor
2) how much memory it uses.
Thanks
-
February 20th, 2002, 07:02 AM
#2
Re: Speed and memory: Hot to Measures?
In Visual C++ you can do a profile on how much time your program spends in each function. This can be done in release mode as well as debug, and you'll normally want to do it in this mode, as that is how it will be running in real life.
You get two figures - one for how much time it spent in the function itself, and another one accumulating any functions it called, so for that one main() is always the highest. You also get a list of the number of times each function was run.
Note: if Profile is greyed on your version of Visual C++ (it's in the Build menu) it probably means you didn't install that option. It doesn't come with the "standard" install.
The best things come to those who rate
-
February 20th, 2002, 09:06 AM
#3
Re: Speed and memory: Hot to Measures?
There is a very powerful application in Rational Suite, called Rational Quantify, which measuresa lot of things (function call number, call graphs, call times, thread execution times, etc.). The setup installs an add-in for Visual Studio 6. It is better that the integrated profiler, but it costs a lot.
To check the memory, you can use the task manager (if under NT, 2000, XP). The utility ProcessViewer, available in Visual Studio Suite can be helpful by providing a lot of data about your process.
-
February 20th, 2002, 09:48 AM
#4
Re: Speed and memory: Hot to Measures?
I should add that I think the profiler also calculates memory use if you want it to.
The best things come to those who rate
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|