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

skip to main content
10.1145/3033019.3033024acmotherconferencesArticle/Chapter ViewAbstractPublication PagesccConference Proceedingsconference-collections
research-article

Compile-time function memoization

Published: 05 February 2017 Publication History

Abstract

Memoization is the technique of saving the results of computations so that future executions can be omitted when the same inputs repeat. Recent work showed that memoization can be applied to dynamically linked pure functions using a load-time technique and results were encouraging for the demonstrated transcendental functions. A restriction of the proposed framework was that memoization was restricted only to dynamically linked functions and the functions must be determined beforehand. In this work, we propose function memoization using a compile-time technique thus extending the scope of memoization to user defined functions as well as making it transparently applicable to any dynamically linked functions. Our compile-time technique allows static linking of memoization code and this increases the benefit due to memoization by leveraging the inlining capability for the memoization wrapper. Our compile-time analysis can also handle functions with pointer parameters, and we handle constants more efficiently. Instruction set support can also be considered, and we propose associated hardware leading to additional performance gain.

References

[1]
C. Alvarez, J. Corbal, and M. Valero. Fuzzy memoization for floatingpoint multimedia applications. IEEE TC, 54(7):922–927, July 2005.
[2]
J.-M. Arnau, J.-M. Parcerisa, and P. Xekalakis. Eliminating redundant fragment shader executions on a mobile GPU via hardware memoization. In ISCA, June 2014.
[3]
V. Aslot, M. Domeika, R. Eigenmann, G. Gaertner, W. B. Jones, and B. Parady. SPEComp: A new benchmark suite for measuring parallel computer performance. In Workshop on OpenMP Applications and Tools, 2001.
[4]
Vasanth Bala, Evelyn Duesterwald, and Sanjeev Banerjia. Dynamo: a transparent dynamic optimization system. In PLDI, 2000.
[5]
Sandra Barsky. This is a program to solve nonlinear 2-D PDE using one-step linearization.
[6]
Christian Bienia, Sanjeev Kumar, Jaswinder Pal Singh, and Kai Li. The PARSEC benchmark suite: Characterization and architectural implications. In PACT, 2008.
[7]
Christian Bienia, Sanjeev Kumar, Jaswinder Pal Singh, and Kai Li. The parsec benchmark suite: Characterization and architectural implications. Technical Report TR-811-08, Princeton University, 2008.
[8]
M. Ciss, N. Parisey, F. Moreau, Ch.-A. Dedryver, and J.-S. Pierre. A spatiotemporal model for predicting grain aphid population dynamics and optimizing insecticide sprays at the scale of continental France. Environmental Science and Pollution Research, 2013.
[9]
Daniel Citron, Dror Feitelson, and Larry Rudolph. Accelerating multimedia processing by implementing memoing in multiplication and division units. In ASPLOS, 1998.
[10]
Daniel Citron and Dror G. Feitelson. Hardware memoization of mathematical and trigonometric functions. Technical report, 2000.
[11]
H. Esmaeilzadeh, A. Sampson, L. Ceze, and D. Burger. Neural acceleration for general-purpose approximate programs. In MICRO, 2012.
[12]
Agner Fox. Calling conventions, 2015.
[13]
Antonio González, Jordi Tubella, and Carlos Molina. Trace-level reuse. In ICPP, pages 30–37, 1999.
[14]
PARSEC Group et al. A memo on exploration of SPLASH-2 input sets. Princeton Univ, 2011.
[15]
John L. Henning. SPEC CPU2006 benchmark descriptions. SIGARCH Comput. Archit. News, 34(4):1–17, 2006.
[16]
Jian Huang and David J Lilja. Exploiting basic block value locality with block reuse. In HPCA, 1999.
[17]
Chris Lattner and Vikram Adve. LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation. In CGO, 2004.
[18]
G. Long, D. Franklin, S. Biswas, P. Ortiz, J. Oberg, D. Fan, and F. T. Chong. Minimal multi-threading: Finding and removing redundant instructions in multi-threaded processors. In MICRO, 2010.
[19]
Paul McNamee and Marty Hall. Developing a tool for memoizing functions in C++. SIGPLAN Not., 33(8):17–22, 1998.
[20]
Pierre Michaud, André Seznec, Damien Fetis, Yiannakis Sazeides, and Theofanis Constantinou. A study of thread migration in temperatureconstrained multicores. TACO, 4(2), June 2007.
[21]
Donald Michie. Memo functions and machine learning. Nature, 218(5136):19–22, 1968.
[22]
Uday Reddy. Objects as closures: Abstract semantics of objectoriented languages. In Conf. on LISP and Functional Programming, 1988.
[23]
Stephen E. Richardson. Caching function results: Faster arithmetic by avoiding unnecessary computation. Technical report, 1992.
[24]
E. Riou, E. Rohou, Ph. Clauss, N. Hallou, and A. Ketterlin. PADRONE: a Platform for Online Profiling, Analysis, and Optimization. In Intl Workshop on Dynamic Compilation Everywhere, 2014.
[25]
Hugo Rito and João Cachopo. Memoization of methods using software transactional memory to track internal state dependencies. In PPPJ, 2010.
[26]
John Stratton et al. Parboil: A revised benchmark suite for scientific and commercial throughput computing. Center for Reliable and High-Performance Computing, 2012.
[27]
Arjun Suresh, Bharath Narasimha Swamy, Erven Rohou, and André Seznec. Intercepting functions for memoization: A case study using transcendental functions. TACO, 12(2), June 2015.
[28]
James Tuck, Wonsun Ahn, Luis Ceze, and Josep Torrellas. Softsig: Software-exposed hardware signatures for code analysis and optimization. In ASPLOS, 2008.

Cited By

View all
  • (2024)Constable: Improving Performance and Power Efficiency by Safely Eliminating Load Instruction Execution2024 ACM/IEEE 51st Annual International Symposium on Computer Architecture (ISCA)10.1109/ISCA59077.2024.00017(88-102)Online publication date: 29-Jun-2024
  • (2024)Approximate Computing: Concepts, Architectures, Challenges, Applications, and Future DirectionsIEEE Access10.1109/ACCESS.2024.346737512(146022-146088)Online publication date: 2024
  • (2023)Speed Optimization in DEVS-Based Simulations: A Memoization ApproachApplied Sciences10.3390/app13231295813:23(12958)Online publication date: 4-Dec-2023
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Other conferences
CC 2017: Proceedings of the 26th International Conference on Compiler Construction
February 2017
141 pages
ISBN:9781450352338
DOI:10.1145/3033019
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]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 05 February 2017

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. compilation
  2. instruction set extension
  3. memoization
  4. optimization
  5. performance

Qualifiers

  • Research-article

Conference

CC '17
CC '17: Compiler Construction
February 5 - 6, 2017
TX, Austin, USA

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

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

Other Metrics

Citations

Cited By

View all
  • (2024)Constable: Improving Performance and Power Efficiency by Safely Eliminating Load Instruction Execution2024 ACM/IEEE 51st Annual International Symposium on Computer Architecture (ISCA)10.1109/ISCA59077.2024.00017(88-102)Online publication date: 29-Jun-2024
  • (2024)Approximate Computing: Concepts, Architectures, Challenges, Applications, and Future DirectionsIEEE Access10.1109/ACCESS.2024.346737512(146022-146088)Online publication date: 2024
  • (2023)Speed Optimization in DEVS-Based Simulations: A Memoization ApproachApplied Sciences10.3390/app13231295813:23(12958)Online publication date: 4-Dec-2023
  • (2023)Million.js: A Fast Compiler-Augmented Virtual DOM for the WebProceedings of the 38th ACM/SIGAPP Symposium on Applied Computing10.1145/3555776.3577683(1813-1820)Online publication date: 27-Mar-2023
  • (2023)TransPimLib: Efficient Transcendental Functions for Processing-in-Memory Systems2023 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS)10.1109/ISPASS57527.2023.00031(235-247)Online publication date: Apr-2023
  • (2022)Information batteriesACM SIGEnergy Energy Informatics Review10.1145/3508467.35084681:1(1-11)Online publication date: 3-Jan-2022
  • (2022)FlooProceedings of the 20th Annual International Conference on Mobile Systems, Applications and Services10.1145/3498361.3538929(168-182)Online publication date: 27-Jun-2022
  • (2022)pLUTo: Enabling Massively Parallel Computation in DRAM via Lookup Tables2022 55th IEEE/ACM International Symposium on Microarchitecture (MICRO)10.1109/MICRO56248.2022.00067(900-919)Online publication date: Oct-2022
  • (2022)Sensing Frequency Drifts: A Lookup Table ApproachIEEE Access10.1109/ACCESS.2022.320318710(96249-96259)Online publication date: 2022
  • (2022)Approximate function memoizationConcurrency and Computation: Practice and Experience10.1002/cpe.720434:23Online publication date: 20-Jul-2022
  • 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