Fluctuations in execution time.


R. Clayton (rclayton@monmouth.edu)
(no date)


Date: 26 Oct 2002 21:19:48 -0400
I keep getting different timings for the same function and the same executable.

  Correct; the input vectors are generated randomly. Use the -sn command-line
  option to create the same set of random vectors each time:

    $ ./min-3sort -s 1
    Computed min-3sort time is 5.2 sec vs. check min-3sort time 2.1 sec (x2.4).

    $ ./min-3sort -s 1
    Computed min-3sort time is 5.2 sec vs. check min-3sort time 2.1 sec (x2.4).

    $ ./min-3sort -s 1
    Computed min-3sort time is 5.1 sec vs. check min-3sort time 2.1 sec (x2.4).

    $ ./min-3sort -s 3
    Computed min-3sort time is 5.1 sec vs. check min-3sort time 0.8 sec (x6.1).

    $ ./min-3sort -s 3
    Computed min-3sort time is 5.1 sec vs. check min-3sort time 0.7 sec (x7.4).

    $ ./min-3sort -s 3
    Computed min-3sort time is 5.1 sec vs. check min-3sort time 0.7 sec (x7.0).

    $ ./min-3sort
    Computed min-3sort time is 5.1 sec vs. check min-3sort time 1.5 sec (x3.4).

    $ ./min-3sort
    Computed min-3sort time is 5.0 sec vs. check min-3sort time 0.6 sec (x8.4).

    $ ./min-3sort
    Computed min-3sort time is 5.1 sec vs. check min-3sort time 1.3 sec (x3.9).

    $

  See the assignment for full details.

Sometimes my function's execution time is within two of your execution time and
sometimes not. Is my function is ok even though its sometimes too slow?

  No; your function is ok only if its execution time is always within two of my
  execution times.



This archive was generated by hypermail 2.0b3 on Mon Dec 16 2002 - 22:00:05 EST