Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/2814270.2814290acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
research-article

Performance problems you can fix: a dynamic analysis of memoization opportunities

Published: 23 October 2015 Publication History

Abstract

Performance bugs are a prevalent problem and recent research proposes various techniques to identify such bugs. This paper addresses a kind of performance problem that often is easy to address but difficult to identify: redundant computations that may be avoided by reusing already computed results for particular inputs, a technique called memoization. To help developers find and use memoization opportunities, we present MemoizeIt, a dynamic analysis that identifies methods that repeatedly perform the same computation. The key idea is to compare inputs and outputs of method calls in a scalable yet precise way. To avoid the overhead of comparing objects at all method invocations in detail, MemoizeIt first compares objects without following any references and iteratively increases the depth of exploration while shrinking the set of considered methods. After each iteration, the approach ignores methods that cannot benefit from memoization, allowing it to analyze calls to the remaining methods in more detail. For every memoization opportunity that MemoizeIt detects, it provides hints on how to implement memoization, making it easy for the developer to fix the performance issue. Applying MemoizeIt to eleven real-world Java programs reveals nine profitable memoization opportunities, most of which are missed by traditional CPU time profilers, conservative compiler optimizations, and other existing approaches for finding performance bugs. Adding memoization as proposed by MemoizeIt leads to statistically significant speedups by factors between 1.04x and 12.93x.

Supplementary Material

Auxiliary Archive (p607-dellatoffola-s.zip)
The archive contains the virtual-machine image submitted for the artifact evaluation. Inside the archive there are two files (overview.pdf and quick_start.pdf) that can be used as a guideline to reproduce the experiments in the paper.

References

[1]
Apache Poi. http://poi.apache.org.
[2]
Google Guava. http://code.google.com/p/ guava-libraries.
[3]
MemoizeIt - Repository. https://github.com/lucadt/ memoizeit.
[4]
NetBeans. http://www.netbeans.org.
[5]
E. R. Altman, M. Arnold, S. Fink, and N. Mitchell. Performance analysis of idle programs. In OOPSLA ’10, pages 739–753.
[6]
M. Attariyan, M. Chow, and J. Flinn. X-ray: Automating root-cause diagnosis of performance anomalies in production. In OSDI ’12, pages 307–320.
[7]
S. Biswas, J. Huang, A. Sengupta, and M. D. Bond. Doublechecker: Efficient sound and precise atomicity checking. In PLDI ’14, pages 28–39, 2014.
[8]
S. M. Blackburn et al. The DaCapo benchmarks: Java benchmarking development and analysis. In OOPSLA ’06, pages 169–190.
[9]
E. Bruneton, R. Lenglet, and T. Coupaye. ASM: a code manipulation tool to implement adaptable systems. In Adaptable and extensible component systems, Nov. 2002.
[10]
J. Burnim, S. Juvekar, and K. Sen. WISE: Automated test generation for worst-case complexity. In ICSE ’09, pages 463–473.
[11]
E. Coppa, C. Demetrescu, and I. Finocchi. Input-sensitive profiling. In PLDI ’12, pages 89–98.
[12]
I. Costa, P. Alves, H. N. Santos, and F. M. Q. Pereira. Just-in-time value specialization. In CGO ’13, pages 1–11.
[13]
Y. Ding and Z. Li. A compiler scheme for reusing intermediate computation results. In CGO ’04, pages 279–290, 2004.
[14]
M. Dmitriev. Design of JFluid: a profiling technology and tool based on dynamic bytecode instrumentation. Technical Report SMLI TR- 2003-125, 2003.
[15]
B. Dufour, B. G. Ryder, and G. Sevitsky. Blended analysis for performance understanding of framework-based applications. In ISSTA ’07, pages 118–128.
[16]
A. Georges, D. Buytaert, and L. Eeckhout. Statistically rigorous Java performance evaluation. In OOPSLA ’07, pages 57–76.
[17]
S. Goldsmith, A. Aiken, and D. S. Wilkerson. Measuring empirical computational complexity. In FSE ’07, pages 395–404.
[18]
L. Gong, M. Pradel, and K. Sen. JITProf: Pinpointing JIT-unfriendly JavaScript code. In FSE ’15, 2015.
[19]
S. L. Graham, P. B. Kessler, and M. K. Mckusick. Gprof: A call graph execution profiler. In SIGPLAN Symposium on Compiler Construction ’82, pages 120–126.
[20]
P. J. Guo and D. Engler. Using automatic persistent memoization to facilitate data analysis scripting. In ISSTA ’11, pages 287–297.
[21]
S. Han, Y. Dang, S. Ge, D. Zhang, and T. Xie. Performance debugging in the large via mining millions of stack traces. In ICSE ’12, pages 145–155.
[22]
X. Huang, S. M. Blackburn, and K. S. McKinley. The garbage collection advantage: improving program locality. In OOPSLA ’04, pages 69–80.
[23]
G. Jin, L. Song, X. Shi, J. Scherpelz, and S. Lu. Understanding and detecting real-world performance bugs. In PLDI ’12, pages 77–88.
[24]
M. Jovic, A. Adamoli, and M. Hauswirth. Catch me if you can: performance bug detection in the wild. In OOPSLA ’11, pages 155– 170.
[25]
R. E. Korf. Depth-first iterative-deepening: An optimal admissible tree search. Artif. Intell., pages 97–109, 1985.
[26]
Y. Liu, C. Xu, and S. Cheung. Characterizing and detecting performance bugs for smartphone applications. In ICSE ’14, pages 1013– 1024.
[27]
Y. Ma, X. Liu, S. Zhang, R. Xiang, Y. Liu, and T. Xie. Measurement and analysis of mobile web cache performance. In WWW ’15, pages 691–701.
[28]
D. Marinov and R. O’Callahan. Object equality profiling. In OOPSLA ’03, pages 313–325.
[29]
T. Mytkowicz, A. Diwan, M. Hauswirth, and P. F. Sweeney. Evaluating the accuracy of Java profilers. In PLDI ’10, pages 187–197.
[30]
K. Nguyen and G. Xu. Cachetor: Detecting cacheable data to remove bloat. In FSE ’13, pages 268–278.
[31]
A. Nistor, L. Song, D. Marinov, and S. Lu. Toddler: detecting performance problems via similar memory-access patterns. In ICSE ’13, pages 562–571, 2013.
[32]
A. Nistor, P.-C. Chang, C. Radoi, and S. Lu. CARAMEL: Detecting and Fixing Performance Problems That Have Non-Intrusive Fixes. In ICSE ’15, 2015.
[33]
M. Pradel, M. Huggler, and T. R. Gross. Performance regression testing of concurrent classes. In ISSTA ’14, pages 13–25, 2014.
[34]
M. Pradel, P. Schuh, G. Necula, and K. Sen. EventBreak: Analyzing the responsiveness of user interfaces through performance-guided test generation. In OOPSLA ’14, pages 33–47, 2014.
[35]
W. Pugh and T. Teitelbaum. Incremental computation via function caching. In POPL ’89, pages 315–328.
[36]
J. B. Sartor, S. Venkiteswaran, K. S. McKinley, and Z. Wang. Cooperative Caching with Keep-Me and Evict-Me. In INTERACT ’05, pages 1–11.
[37]
A. Shankar, M. Arnold, and R. Bod´ık. Jolt: lightweight dynamic analysis and removal of object churn. In OOPSLA ’08, pages 127– 142.
[38]
A. Shankar, S. S. Sastry, R. Bod´ık, and J. E. Smith. Runtime specialization with optimistic heap analysis. In OOPSLA ’05, pages 327–343, 2005.
[39]
L. Song and S. Lu. Statistical debugging for real-world performance problems. In OOPSLA ’14, pages 561–578.
[40]
V. St-Amour, S. Tobin-Hochstadt, and M. Felleisen. Optimization coaching: optimizers learn to communicate with programmers. In OOPSLA ’12, pages 163–178.
[41]
R. Vallée-Rai, P. Co, E. Gagnon, L. J. Hendren, P. Lam, and V. Sundaresan. Soot - a Java bytecode optimization framework. In CASCON ’99, pages 125–135. IBM, 1999.
[42]
X. Xiao, S. Han, D. Zhang, and T. Xie. Context-sensitive delta inference for identifying workload-dependent performance bottlenecks. In ISSTA ’13, pages 90–100.
[43]
G. Xu. Finding reusable data structures. In OOPSLA ’12, pages 1017– 1034, 2012.
[44]
G. Xu and A. Rountev. Detecting inefficiently-used containers to avoid bloat. In PLDI ’10, pages 160–173, 2010.
[45]
G. Xu, M. Arnold, N. Mitchell, A. Rountev, and G. Sevitsky. Go with the flow: profiling copies to find runtime bloat. In PLDI ’09, pages 419–430, 2009.
[46]
G. Xu, N. Mitchell, M. Arnold, A. Rountev, E. Schonberg, and G. Sevitsky. Finding low-utility data structures. In PLDI ’10, pages 174– 186, 2010.
[47]
H. Xu, C. J. F. Pickett, and C. Verbrugge. Dynamic purity analysis for Java programs. In PASTE ’07, pages 75–82.
[48]
D. Yan, G. Xu, and A. Rountev. Uncovering performance problems in Java applications with reference propagation profiling. In ISCE ’12, pages 134–144.
[49]
X. Yu, S. Han, D. Zhang, and T. Xie. Comprehending Performance from Real-world Execution Traces: A Device-driver Case. In ASPLOS ’14, pages 193–206.
[50]
S. Zaman, B. Adams, and A. E. Hassan. A qualitative study on performance bugs. In MSR ’12, pages 199–208.

Cited By

View all
  • (2024)DyPyBench: A Benchmark of Executable Python SoftwareProceedings of the ACM on Software Engineering10.1145/36437421:FSE(338-358)Online publication date: 12-Jul-2024
  • (2024)eFish'nSea: Unity Game Set for Learning Software Performance Issues Root Causes and ResolutionsProceedings of the 46th International Conference on Software Engineering: Software Engineering Education and Training10.1145/3639474.3640066(342-347)Online publication date: 14-Apr-2024
  • (2023)DJXPerf: Identifying Memory Inefficiencies via Object-Centric Profiling for JavaProceedings of the 21st ACM/IEEE International Symposium on Code Generation and Optimization10.1145/3579990.3580010(81-94)Online publication date: 17-Feb-2023
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
OOPSLA 2015: Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications
October 2015
953 pages
ISBN:9781450336895
DOI:10.1145/2814270
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 50, Issue 10
    OOPSLA '15
    October 2015
    953 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2858965
    • Editor:
    • Andy Gill
    Issue’s Table of Contents
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: 23 October 2015

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Memoization
  2. caching
  3. performance bugs
  4. profiling

Qualifiers

  • Research-article

Conference

SPLASH '15
Sponsor:

Acceptance Rates

Overall Acceptance Rate 268 of 1,244 submissions, 22%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)50
  • Downloads (Last 6 weeks)3
Reflects downloads up to 01 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2024)DyPyBench: A Benchmark of Executable Python SoftwareProceedings of the ACM on Software Engineering10.1145/36437421:FSE(338-358)Online publication date: 12-Jul-2024
  • (2024)eFish'nSea: Unity Game Set for Learning Software Performance Issues Root Causes and ResolutionsProceedings of the 46th International Conference on Software Engineering: Software Engineering Education and Training10.1145/3639474.3640066(342-347)Online publication date: 14-Apr-2024
  • (2023)DJXPerf: Identifying Memory Inefficiencies via Object-Centric Profiling for JavaProceedings of the 21st ACM/IEEE International Symposium on Code Generation and Optimization10.1145/3579990.3580010(81-94)Online publication date: 17-Feb-2023
  • (2023)Effective Performance Issue Diagnosis with Value-Assisted Cost ProfilingProceedings of the Eighteenth European Conference on Computer Systems10.1145/3552326.3587444(1-17)Online publication date: 8-May-2023
  • (2023)Software runtime monitoring with adaptive sampling rate to collect representative samples of execution tracesJournal of Systems and Software10.1016/j.jss.2023.111708202:COnline publication date: 1-Aug-2023
  • (2022)Caching and Reproducibility: Making Data Science Experiments Faster and FAIRerFrontiers in Research Metrics and Analytics10.3389/frma.2022.8619447Online publication date: 22-Apr-2022
  • (2022)DynaPyt: a dynamic analysis framework for PythonProceedings of the 30th ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3540250.3549126(760-771)Online publication date: 7-Nov-2022
  • (2022)OJXPerfProceedings of the 44th International Conference on Software Engineering10.1145/3510003.3510083(1558-1570)Online publication date: 21-May-2022
  • (2022)A comparative study of application-level caching recommendations at the method levelEmpirical Software Engineering10.1007/s10664-021-10089-z27:4Online publication date: 1-Jul-2022
  • (2021)ForerunnerProceedings of the ACM SIGOPS 28th Symposium on Operating Systems Principles10.1145/3477132.3483564(570-587)Online publication date: 26-Oct-2021
  • 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

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media