Empirical algorithmics explained

In computer science, empirical algorithmics (or experimental algorithmics) is the practice of using empirical methods to study the behavior of algorithms. The practice combines algorithm development and experimentation: algorithms are not just designed, but also implemented and tested in a variety of situations. In this process, an initial design of an algorithm is analyzed so that the algorithm may be developed in a stepwise manner.[1]

Overview

Methods from empirical algorithmics complement theoretical methods for the analysis of algorithms.[2] Through the principled application of empirical methods, particularly from statistics, it is often possible to obtain insights into the behavior of algorithms such as high-performance heuristic algorithms for hard combinatorial problems that are (currently) inaccessible to theoretical analysis.[3] Empirical methods can also be used to achieve substantial improvements in algorithmic efficiency.[4]

American computer scientist Catherine McGeoch identifies two main branches of empirical algorithmics: the first (known as empirical analysis) deals with the analysis and characterization of the behavior of algorithms, and the second (known as algorithm design or algorithm engineering) is focused on empirical methods for improving the performance of algorithms.[5] The former often relies on techniques and tools from statistics, while the latter is based on approaches from statistics, machine learning and optimization. Dynamic analysis tools, typically performance profilers, are commonly used when applying empirical methods for the selection and refinement of algorithms of various types for use in various contexts.[6] [7] [8]

Research in empirical algorithmics is published in several journals, including the ACM Journal on Experimental Algorithmics (JEA) and the Journal of Artificial Intelligence Research (JAIR). Besides Catherine McGeoch, well-known researchers in empirical algorithmics include Bernard Moret, Giuseppe F. Italiano, Holger H. Hoos, David S. Johnson, and Roberto Battiti.[9]

Performance profiling in the design of complex algorithms

In the absence of empirical algorithmics, analyzing the complexity of an algorithm can involve various theoretical methods applicable to various situations in which the algorithm may be used.[10] Memory and cache considerations are often significant factors to be considered in the theoretical choice of a complex algorithm, or the approach to its optimization, for a given purpose.[11] [12] Performance profiling is a dynamic program analysis technique typically used for finding and analyzing bottlenecks in an entire application's code[13] [14] [15] or for analyzing an entire application to identify poorly performing code.[16] A profiler can reveal the code most relevant to an application's performance issues.[17]

A profiler may help to determine when to choose one algorithm over another in a particular situation.[18] When an individual algorithm is profiled, as with complexity analysis, memory and cache considerations are often more significant than instruction counts or clock cycles; however, the profiler's findings can be considered in light of how the algorithm accesses data rather than the number of instructions it uses.[19]

Profiling may provide intuitive insight into an algorithm's behavior[20] by revealing performance findings as a visual representation.[21] Performance profiling has been applied, for example, during the development of algorithms for matching wildcards. Early algorithms for matching wildcards, such as Rich Salz' wildmat algorithm,[22] typically relied on recursion, a technique criticized on grounds of performance.[23] The Krauss matching wildcards algorithm was developed based on an attempt to formulate a non-recursive alternative using test cases[24] followed by optimizations suggested via performance profiling,[25] resulting in a new algorithmic strategy conceived in light of the profiling along with other considerations.[26] Profilers that collect data at the level of basic blocks[27] or that rely on hardware assistance[28] provide results that can be accurate enough to assist software developers in optimizing algorithms for a particular computer or situation.[29] Performance profiling can aid developer understanding of the characteristics of complex algorithms applied in complex situations, such as coevolutionary algorithms applied to arbitrary test-based problems, and may help lead to design improvements.[30]

See also

Notes and References

  1. Book: Fleischer . Rudolf . etal . Experimental Algorithmics, From Algorithm Design to Robust and Efficient Software. Springer International Publishing AG. 2002.
  2. Book: Moret, Bernard M. E.. 2221596. Towards A Discipline Of Experimental Algorithmics. DIMACS Series in Discrete Mathematics and Theoretical Computer Science. DIMACS Series in Discrete Mathematics and Theoretical Computer Science. 1999. 59. 197–213. 10.1090/dimacs/059/10. 9780821828922.
  3. Book: Hromkovic, Juraj. Algorithmics for Hard Problems. Springer International Publishing AG. 2004.
  4. Journal of Software. 12. 12. Guzman. John Paul. Limoanco. Teresita. An Empirical Approach to Algorithm Analysis Resulting in Approximations to Big Theta Time Complexity. 2017.
  5. Book: McGeoch, Catherine . A Guide to Experimental Algorithmics . 2012 . Cambridge University Press . 978-1-107-00173-2.
  6. IEEE Transactions on Software Engineering. 40. 12. Coppa. Emilio. Demetrescu. Camil. Finocchi. Irene. Input-Sensitive Profiling. 1185–1205. 2014. 10.1109/TSE.2014.2339825. 10.1.1.707.4347.
  7. The Journal of Supercomputing. 22. 1. 99–111. Moret. Bernard M. E.. Bader. David A.. Warnow. Tandy. High-Performance Algorithm Engineering for Computational Phylogenetics. 2002. 10.1023/a:1014362705613. 614550.
  8. 33rd ACM SIGPLAN Conference on Programming Language Design and Implementation. 67–76. Zaparanuks. Dmitrijs. Hauswirth. Matthias. Algorithmic Profiling. ACM Digital Library. 2012. 10.1.1.459.4913.
  9. Ubiquity. 2011. August. On experimental algorithmics: an interview with Catherine McGeoch and Bernard Moret. ACM Digital Library. 2011.
  10. Web site: Grzegorz. Mirek. Big-O Ambiguity. performant code_. 2018.
  11. Web site: Kölker. Jonas. When does Big-O notation fail?. Stack Overflow. 2009.
  12. Web site: Lemire. Daniel. Big-O notation and real-world performance. WordPress. 2013.
  13. Web site: dotTrace 2018.1 Help. Finding Application Bottlenecks. JetBrains. 2018.
  14. Web site: Shmeltzer. Shay. Oracle Technology Network JDeveloper documentation. Locating Bottlenecks in Your Code with the Event Profiler. Oracle Corp.. 2005.
  15. Book: Shen. Du. Poshyvanyk. Denys. Luo. Qi. Grechanik. Mark. Proceedings of the 2015 International Symposium on Software Testing and Analysis. Automating performance bottleneck detection using search-based application profiling. 270–281. ACM Digital Library. 2015. https://www.cs.uic.edu/~drmark/index_htm_files/ISSTA15-GAProf.pdf. 10.1145/2771783.2771816. 9781450336208. 8625903.
  16. Web site: The Profile Learning Center. Performance & Memory Profiling and Code Coverage. SmartBear Software. 2018.
  17. Web site: Janssen. Thorben. Stackify Developer Tips, Tricks and Resources. 11 Simple Java Performance Tuning Tips. 2017.
  18. Book: O'Sullivan. Bryan. Stewart. Don. Goerzen. John. Real World Haskell. 25. Profiling and optimization. O'Reilly Media. 2008. http://book.realworldhaskell.org/read/profiling-and-optimization.html#id679553.
  19. Web site: Linden. Doug. Second Life Wiki. 2007. Profiling and Optimization.
  20. Web site: Pattis. Richard E.. Analysis of Algorithms, Advanced Programming/Practicum, 15-200. School of Computer Science, Carnegie Mellon University. 2007.
  21. Web site: Advanced R. Wickham. Hadley. Optimising code. Chapman and Hall/CRC. 2014.
  22. Web site: Salz. Rich. wildmat.c. GitHub. 1991.
  23. Web site: Cantatore. Alessandro. Wildcard matching algorithms. 2003.
  24. Krauss. Kirk. Matching Wildcards: An Algorithm. Dr. Dobb's Journal. 2008.
  25. Krauss. Kirk. Matching Wildcards: An Empirical Way to Tame an Algorithm. Dr. Dobb's Journal. 2014.
  26. Web site: Krauss. Kirk. Matching Wildcards: An Improved Algorithm for Big Data. Develop for Performance. 2018.
  27. Web site: Grehan. Rick. Code Profilers: Choosing a Tool for Analyzing Performance. Freescale Semiconductor. 2005. If, on the other hand, you need to step through your code with microscopic accuracy, fine-tuning individual machine instructions, then an active profiler with cycle-counting cannot be beat.
  28. Hough. Richard. etal. Proceedings of Workshop on Introspective Architecture. Cycle-Accurate Microarchitecture Performance Evaluation. Georgia Institute of Technology. 2006. 10.1.1.395.9306.
  29. IEEE International conference on Emerging trends in Computing, Communication and Nanotechnology. Khamparia. Aditya. Banu. Saira. Program Analysis with Dynamic Instrumentation Pin and Performance Tools. IEEE Xplore Digital Library. 2013.
  30. Jaskowski. Wojciech. Liskowski. Pawel. Szubert. Marcin Grzegorz. Krawiec. Krzysztof. Applied Mathematics and Computer Science. 26. 216. The performance profile: A multi-criteria performance evaluation method for test-based problems. De Gruyter. 2016.