# How to evaluate and compare the performance of algorithms in practice?

Let $A$ be a heuristic algorithm for problem $Q$. I want to evaluate the performance of my algorithm in a specific practical environment and compare it to other algorithms. Is there a rigorous framework for comparison of algorithms in practice?

One method to evaluate the performance and compare it with other algorithms is to run them on randomly generated inputs from a distribution (based on actual inputs or a theoretical model of inputs) and measure the average running time of the algorithms. However I want to be able to express that one algorithm is better than other one in stronger sense than just having better expected running time.

What do people use for to express stronger conditions? Would standard deviation be a useful for this purpose? What is the best way to measure the confidence level of the performance?

Are the any references (books/surveys/tutorials/...) on how to compare the performance of algorithms in practice?

• Your question does not appear to be a research-level question in theoretical computer science. For more information about the scope, please see help center. Your question might be suitable for Computer Science which has a broader scope. If you post your question there, make sure to follow the cross-posting guidelines of both sites. Nov 27, 2015 at 5:48
• @chazisop, I think this is a good and on-topic question. There are many problems that we only have heuristics (or heuristics perform better than non-heuristic algorithms or algorithms with worst theoretical analysis perform better than those with better theoretical analysis). Nov 28, 2015 at 0:45
• Yes and no. The edited question is a well-known question in heuristics research AFAIK, but on the other hand it is too broad (essentially it is the starting point for a large body of research). But imho the edit is far in meaning and intent from the original question which while had the merit to be narrow, was simply asking on how to measure the expected running time of a scheduling algorithm on random inputs, which is a standard topic. Nov 29, 2015 at 1:29
• try putting the science back in CS by sedgewick. it is slightly controversial whether theoretical CS includes empirical/ experimental aspects. see eg theory without experiments: have we gone to far? by Mitzenmacher / CACM.
– vzn
Nov 30, 2015 at 18:00

## 1 Answer

I believe what you're looking for is the field of Experimental Algorithmics. There is a text by McGeoch, an ACM Journal, and a previous question on this site that provides a reading list for the field.

• In my case, the input is a directed acyclic graph. In that case, if I generate random graphs, the output may not necessarily generate normal distribution. Am I right in this case? Nov 28, 2015 at 10:00
• I can't really speak to your situation, just the fact that a whole area of research exists to address the performance of algorithms in practice. You packed 4 questions into your one question, and I was just addressing the general reference request part. Nov 28, 2015 at 21:28