I am trying to get the total execution time of a program - running it different times will give different run times since it depends on a lot of factors. Thus, I am running this program multiple times and taking the mean running time. Is there a way to determine what is the optimal number of times this program should be run because running it too many times will lead to the waste of precious resources, while running it too little times will not allow me to gain reliable insights?

  • $\begingroup$ How much resource is insight worth to you? $\endgroup$ – Robert Israel Mar 18 at 18:32
  • $\begingroup$ Sorry I did not understand your question $\endgroup$ – CXB Mar 18 at 18:51
  • $\begingroup$ In order to call something "optimal", you need to specify the objective function: precisely what quantity is being optimized? $\endgroup$ – Robert Israel Mar 18 at 21:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.