Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/1287624.1287681acmconferencesArticle/Chapter ViewAbstractPublication PagesfseConference Proceedingsconference-collections
Article

Measuring empirical computational complexity

Published: 07 September 2007 Publication History

Abstract

The standard language for describing the asymptotic behavior of algorithms is theoretical computational complexity. We propose a method for describing the asymptotic behavior of programs in practice by measuring their empirical computational complexity. Our method involves running a program on workloads spanning several orders of magnitude in size, measuring their performance, and fitting these observations to a model that predicts performance as a function of workload size. Comparing these models to the programmer's expectations or to theoretical asymptotic bounds can reveal performance bugs or confirm that a program's performance scales as expected. Grouping and ranking program locations based on these models focuses attention on scalability-critical code. We describe our tool, the Trend Profiler (trend-prof), for constructing models of empirical computational complexity that predict how many times each basic block in a program runs as a linear (y = a + bx) or a powerlaw (y = axb) function of user-specified features of the program's workloads. We ran trend-prof on several large programs and report cases where a program scaled as expected, beat its worst-case theoretical complexity bound, or had a performance bug.

References

[1]
A. Alexandrov, M. F. Ionescu, K. E. Schauser, and C. Scheiman. LogGP: Incorporating long messages into the LogP model - One step closer towards a realistic model for parallel computation. In SPAA '95: Proceedings of the 7th Annual ACM Symposium on Parallel Algorithms and Architectures, pages 95--105, New York, NY, USA, 1995. ACM Press.
[2]
G. Ammons, J.-D. Choi, M. Gupta, and N. Swamy. Finding and removing performance bottlenecks in large systems. In ECOOP 2004. Springer Berlin / Heidelberg.
[3]
L.O.Andersen.Program Analysis and Specialization for the C Programming Language. Ph.d. thesis, DIKU, Unversity of Copenhagen, 1994.
[4]
T. Ball and J. R. Larus. Optimally profiling and tracing programs. ACM Trans. Program. Lang. Syst., 16(4):1319--1360, 1994.
[5]
E. A. Brewer. High-level optimization via automated statistical modeling. In PPOPP '95: Proceedings of the 5th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, pages 80--91, New York, NY, USA, 1995. ACM Press.
[6]
bzip2 project homepage. http://www.bzip.org/.
[7]
gcov documentation. http://gcc.gnu.org/onlinedocs/gcc/Gcov.html.
[8]
S. L. Graham, P. B. Kessler, and M. K. Mckusick. Gprof: A call graph execution profiler. In SIGPLAN '82: Proceedings of the 1982 SIGPLAN Symposium on Compiler Construction, pages 120--126, New York, NY, USA, 1982. ACM Press.
[9]
M. Kluge, A. Knüpfer, and W. E. Nagel. Knowledge based automatic scalability analysis and extrapolation for MPI programs. In Euro-Par 2005 Parallel Processing: 11th International Euro-Par Conference, Lecture Notes in Computer Science. Springer-Verlag.
[10]
J. Kodumal and A. Aiken. Banshee: A scalable constraint-based analysis toolkit. In SAS '05: Proceedings of the 12th International Static Analysis Symposium. London, United Kingdom, September 2005.
[11]
S. McPeak and G. C. Necula. Elkhound: A fast, practical GLR parser generator. In Conference on Compiler Construction (CC04), 2004.
[12]
D. L. Métayer. ACE: An automatic complexity evaluator. ACM Trans. Program. Lang. Syst., 10(2):248--266, 1988.
[13]
J. A. Rice. Mathematical Statistics and Data Analysis. Duxbury Press, 2006.
[14]
M. Rosendahl. Automatic complexity analysis. Proceedings of the 4th International Conference on Functional Programming Languages and Computer Architecture, pages 144--156, 1989.
[15]
R. Rugina and K. Schauser. Predicting the running times of parallel programs by simulation. In Proceedings of the 12th International Parallel Processing Symposium and 9th Symposium on Parallel and Distributed Processing, 1998.
[16]
V. Sarkar. Determining average program execution times and their variance. In PLDI '89: Proceedings of the ACM SIGPLAN 1989 Conference on Programming Language Design and Implementation, pages 298--312, New York, NY, USA, 1989. ACM Press.
[17]
G. Sevitsky, W. de Pauw, and R. Konuru. An information exploration tool for performance analysis of Java programs. In TOOLS '01: Proceedings of the Technology of Object-Oriented Languages and Systems, page 85, Washington, DC, USA, 2001. IEEE Computer Society.
[18]
E. Ukkonen. A linear-time algorithm for finding approximate shortest common superstrings. In Algorithmica, volume 5, pages 313--323, 1990.
[19]
B. Wegbreit. Mechanical program analysis. Commun. ACM, 18(9):528--539, 1975.

Cited By

View all
  • (2024)A novel approach to source code assembling in the field of algorithmic complexityComputer Science and Information Systems10.2298/CSIS230730015P21:3(781-806)Online publication date: 2024
  • (2024)An Optimised Hoffman Algorithm for Testing Linear Code EquivalencyMathematics and Computer Science10.11648/j.mcs.20240902.119:2(26-35)Online publication date: 29-Apr-2024
  • (2024)Robust Resource Bounds with Static Analysis and Bayesian InferenceProceedings of the ACM on Programming Languages10.1145/36563808:PLDI(76-101)Online publication date: 20-Jun-2024
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
ESEC-FSE '07: Proceedings of the the 6th joint meeting of the European software engineering conference and the ACM SIGSOFT symposium on The foundations of software engineering
September 2007
638 pages
ISBN:9781595938114
DOI:10.1145/1287624
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 07 September 2007

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. empirical computational complexity
  2. trend-prof

Qualifiers

  • Article

Conference

ESEC/FSE07
Sponsor:

Acceptance Rates

Overall Acceptance Rate 112 of 543 submissions, 21%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)64
  • Downloads (Last 6 weeks)9
Reflects downloads up to 19 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2024)A novel approach to source code assembling in the field of algorithmic complexityComputer Science and Information Systems10.2298/CSIS230730015P21:3(781-806)Online publication date: 2024
  • (2024)An Optimised Hoffman Algorithm for Testing Linear Code EquivalencyMathematics and Computer Science10.11648/j.mcs.20240902.119:2(26-35)Online publication date: 29-Apr-2024
  • (2024)Robust Resource Bounds with Static Analysis and Bayesian InferenceProceedings of the ACM on Programming Languages10.1145/36563808:PLDI(76-101)Online publication date: 20-Jun-2024
  • (2024)Assessment of Diagnostic Capabilities of Methods of Recreation of Voltage Fluctuations2024 IEEE 18th International Conference on Compatibility, Power Electronics and Power Engineering (CPE-POWERENG)10.1109/CPE-POWERENG60842.2024.10604333(1-6)Online publication date: 24-Jun-2024
  • (2024)Tensor power flow formulations for multidimensional analyses in distribution systemsInternational Journal of Electrical Power & Energy Systems10.1016/j.ijepes.2024.110275162(110275)Online publication date: Nov-2024
  • (2023)A Class of Programs that Admit Exact Complexity Analysis via Newton?s Polynomial InterpolationProceedings of the XXVII Brazilian Symposium on Programming Languages10.1145/3624309.3624311(50-55)Online publication date: 25-Sep-2023
  • (2023)Inferring Complexity Bounds from Recurrence RelationsProceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3611643.3617853(2198-2200)Online publication date: 30-Nov-2023
  • (2023)Application Performance Modeling via Tensor CompletionProceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis10.1145/3581784.3607069(1-14)Online publication date: 12-Nov-2023
  • (2023)Performance Bug Analysis and Detection for Distributed Storage and Computing SystemsACM Transactions on Storage10.1145/358028119:3(1-33)Online publication date: 19-Jun-2023
  • (2023)A Large-Scale Empirical Study of Real-Life Performance Issues in Open Source ProjectsIEEE Transactions on Software Engineering10.1109/TSE.2022.316762849:2(924-946)Online publication date: 1-Feb-2023
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media