for my first assignment we need to get the experimental run time of our program for various input sizes but I do not know where we can find the run time of the program in eclipse If someone could help me out I would greatly appreciate it.
Thanks!
Printable View
for my first assignment we need to get the experimental run time of our program for various input sizes but I do not know where we can find the run time of the program in eclipse If someone could help me out I would greatly appreciate it.
Thanks!
There are methods in the System class that will return the current time.
Get the time at the start and end and subtract.
alright so i did that and got:
23465106954281 end
23465106493853 start
difference of 460428 ns. or 0.460428 milliseconds. sound good?
You were the one watching the code run. Does about 1/2 second look right?
Put in a loop that goes a million times and see how long that takes.
i meant in terms of a simple program is that a good run time but its fine it seems to be running at around .03 ms per input. in a linear fashion so i guess its good.
It all depends....Quote:
is that a good run time