Performance Tests?

This is a discussion on Performance Tests? within the C++ Programming forums, part of the General Programming Boards category; As I've been trying to get a better handle on C++ lately, I was wondering how it would be possible ...

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    75

    Question Performance Tests?

    As I've been trying to get a better handle on C++ lately, I was wondering how it would be possible to conduct performance tests on different segments of code. For example, func1() versus func2() in clock cycle time, etc.

    Are there any tools that would make all that easy within the IDE? Thx for the help.

    edit: btw, i know that performance depends on compiler optimizations and may not be consistent.

  2. #2
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    Well you can write your own timing functions and then just compare the results. Otherwise you can get a profiler which will give you details about the running time of your code ( I.E. - How much time spent in each function, etc. ). I like profilers they are excellent, especially for finding bottle necks.

  3. #3
    Registered User
    Join Date
    Jan 2002
    Posts
    75
    yeah, that's close to what i'm looking for, know where i can get exec. profilers?

  4. #4
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    I know VC++ ( Professional Edition, not sure about others ) comes with a decent profiler. I've always used this one so I'm not sure where you can find some good free ones. Probably just search around and something will come up.

  5. #5
    Registered User
    Join Date
    Jan 2002
    Posts
    75
    oh, well that's what i happen to have too (vstudio.net c++), where is this profiler though?

  6. #6
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    Enable the profiling in your project settings, then go to Build->Profile and you can select the options there.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Performance and footprint of virtual function
    By George2 in forum C++ Programming
    Replies: 8
    Last Post: 01-31-2008, 06:34 PM
  2. File map performance
    By George2 in forum C++ Programming
    Replies: 8
    Last Post: 01-04-2008, 03:18 AM
  3. How can I monitor the performance of my C++ Code?
    By honeysting in forum C++ Programming
    Replies: 1
    Last Post: 03-26-2006, 07:10 AM
  4. Binary Search Trees Part III
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 10-02-2004, 03:00 PM
  5. inheritance and performance
    By kuhnmi in forum C++ Programming
    Replies: 5
    Last Post: 08-04-2004, 12:46 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21