Empirical algorithmics

From HandWiki
Revision as of 20:25, 6 February 2024 by WikiGary (talk | contribs) (linkage)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Short description: Use of empirical methods to study algorithms

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

References

  1. Fleischer, Rudolf, ed (2002). Experimental Algorithmics, From Algorithm Design to Robust and Efficient Software. Springer International Publishing AG. https://www.springer.com/us/book/9783540003465#aboutBook. 
  2. Moret, Bernard M. E. (1999). Towards A Discipline Of Experimental Algorithmics. DIMACS Series in Discrete Mathematics and Theoretical Computer Science. 59. DIMACS Series in Discrete Mathematics and Theoretical Computer Science. pp. 197–213. doi:10.1090/dimacs/059/10. ISBN 9780821828922. 
  3. Hromkovic, Juraj (2004). Algorithmics for Hard Problems. Springer International Publishing AG. https://www.springer.com/us/book/9783540441342. 
  4. Guzman, John Paul; Limoanco, Teresita (2017). "An Empirical Approach to Algorithm Analysis Resulting in Approximations to Big Theta Time Complexity". Journal of Software 12 (12). http://www.jsoftware.us/vol12/308-TE023.pdf. 
  5. McGeoch, Catherine (2012). A Guide to Experimental Algorithmics. Cambridge University Press. ISBN 978-1-107-00173-2. 
  6. Coppa, Emilio; Demetrescu, Camil; Finocchi, Irene (2014). "Input-Sensitive Profiling". IEEE Transactions on Software Engineering 40 (12): 1185–1205. doi:10.1109/TSE.2014.2339825. https://www.academia.edu/19232999. 
  7. Moret, Bernard M. E.; Bader, David A.; Warnow, Tandy (2002). "High-Performance Algorithm Engineering for Computational Phylogenetics". The Journal of Supercomputing 22 (1): 99–111. doi:10.1023/a:1014362705613. https://infoscience.epfl.ch/record/97856/files/mbw_iccs.pdf. 
  8. Zaparanuks, Dmitrijs; Hauswirth, Matthias (2012). "Algorithmic Profiling". ACM Digital Library. pp. 67–76. 
  9. "On experimental algorithmics: an interview with Catherine McGeoch and Bernard Moret". Ubiquity (ACM Digital Library) 2011 (August). 2011. https://ubiquity.acm.org/article.cfm?id=2015997. 
  10. Grzegorz, Mirek (2018). "Big-O Ambiguity". performant code_. http://performantcode.com/complexity/big-o-inaccuracy/. 
  11. Kölker, Jonas (2009). "When does Big-O notation fail?". Stack Overflow. https://stackoverflow.com/questions/941283/when-does-big-o-notation-fail. 
  12. Lemire, Daniel (2013). "Big-O notation and real-world performance". WordPress. https://lemire.me/blog/2013/07/11/big-o-notation-and-real-world-performance/. 
  13. "Finding Application Bottlenecks". dotTrace 2018.1 Help. JetBrains. 2018. https://www.jetbrains.com/help/profiler/Studying_Profiling_Results__Finding_Application_Bottlenecks.html. 
  14. Shmeltzer, Shay (2005). "Locating Bottlenecks in Your Code with the Event Profiler". Oracle Technology Network JDeveloper documentation. Oracle Corp.. http://www.oracle.com/technetwork/developer-tools/jdev/event-profiler-082901.html. 
  15. Shen, Du; Poshyvanyk, Denys; Luo, Qi; Grechanik, Mark (2015). "Automating performance bottleneck detection using search-based application profiling". Proceedings of the 2015 International Symposium on Software Testing and Analysis. ACM Digital Library. pp. 270–281. doi:10.1145/2771783.2771816. ISBN 9781450336208. https://www.cs.uic.edu/~drmark/index_htm_files/ISSTA15-GAProf.pdf. 
  16. "Performance & Memory Profiling and Code Coverage". The Profile Learning Center. SmartBear Software. 2018. https://smartbear.com/learn/code-profiling/#_ga=2.227401693.1994316574.1526935817-1104429500.1526935817. 
  17. Janssen, Thorben (2017). "11 Simple Java Performance Tuning Tips". Stackify Developer Tips, Tricks and Resources. https://stackify.com/java-performance-tuning/. 
  18. O'Sullivan, Bryan; Stewart, Don; Goerzen, John (2008). "25. Profiling and optimization". Real World Haskell. O'Reilly Media. http://book.realworldhaskell.org/read/profiling-and-optimization.html#id679553. 
  19. Linden, Doug (2007). "Profiling and Optimization". Second Life Wiki. http://wiki.secondlife.com/wiki/Profiling_and_Optimization. 
  20. Pattis, Richard E. (2007). "Analysis of Algorithms, Advanced Programming/Practicum, 15-200". School of Computer Science, Carnegie Mellon University. https://www.cs.cmu.edu/~pattis/15-1XX/15-200/lectures/aa/lecture.html#Profiling. 
  21. Wickham, Hadley (2014). "Optimising code". Advanced R. Chapman and Hall/CRC. http://adv-r.had.co.nz/Profiling.html#measure-perf. 
  22. Salz, Rich (1991). "wildmat.c". GitHub. https://github.com/trevor/transmission/blob/master/libtransmission/wildmat.c. 
  23. Cantatore, Alessandro (2003). "Wildcard matching algorithms". http://xoomer.virgilio.it/acantato/dev/wildcard/wildmatch.html. 
  24. Krauss, Kirk (2008). "Matching Wildcards: An Algorithm". Dr. Dobb's Journal. http://www.drdobbs.com/architecture-and-design/matching-wildcards-an-algorithm/210200888. 
  25. Krauss, Kirk (2014). "Matching Wildcards: An Empirical Way to Tame an Algorithm". Dr. Dobb's Journal. http://www.drdobbs.com/architecture-and-design/matching-wildcards-an-empirical-way-to-t/240169123. 
  26. Krauss, Kirk (2018). "Matching Wildcards: An Improved Algorithm for Big Data". Develop for Performance. http://www.developforperformance.com/MatchingWildcards_AnImprovedAlgorithmForBigData.html. 
  27. Grehan, Rick (2005). "Code Profilers: Choosing a Tool for Analyzing Performance". Freescale Semiconductor. https://www.nxp.com/docs/en/white-paper/CWCODEWP.pdf.  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 (2006). "Cycle-Accurate Microarchitecture Performance Evaluation". Proceedings of Workshop on Introspective Architecture (Georgia Institute of Technology). 
  29. Khamparia, Aditya; Banu, Saira (2013). "Program Analysis with Dynamic Instrumentation Pin and Performance Tools". IEEE Xplore Digital Library. https://www.researchgate.net/publication/259620907. 
  30. Jaskowski, Wojciech; Liskowski, Pawel; Szubert, Marcin Grzegorz; Krawiec, Krzysztof (2016). "The performance profile: A multi-criteria performance evaluation method for test-based problems". Applied Mathematics and Computer Science (De Gruyter) 26: 216. https://www.degruyter.com/downloadpdf/j/amcs.2016.26.issue-1/amcs-2016-0015/amcs-2016-0015.pdf.