c++ benchmarking

Discussion in 'Computer Science & Culture' started by gram1234, Apr 29, 2003.

Thread Status:
Not open for further replies.
  1. gram1234 Registered Member

    Messages:
    18
    How could you use benchmarking to get a good idea of the complexity of an algorithm for which it is difficult to analyze the actual steps?
    Thanks for the help.
     
  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. mouse can't sing, can't dance Registered Senior Member

    Messages:
    671
    Perhaps, something like this:

    given a single parameter (n) that is the input of your algorithm, run the benchmark, let the run time be t1.
    increase the single parameter, run the benchmark, let the run time be t2.
    increase the single parameter again, run the benchmark, let the run time be t3.
    etc.

    Plot a graph with on the x-axis n, on the y-axis t, and see what kind of function you have...
     
  4. Google AdSense Guest Advertisement



    to hide all adverts.
  5. gram1234 Registered Member

    Messages:
    18
    re:benchmarking

    That makes some sense.Thanks Mouse
     
  6. Google AdSense Guest Advertisement



    to hide all adverts.
Thread Status:
Not open for further replies.

Share This Page