SoftwareX (Jul 2019)

A framework for automatic and parameterizable memoization

  • Loïc Besnard,
  • Pedro Pinto,
  • Imane Lasri,
  • João Bispo,
  • Erven Rohou,
  • João M.P. Cardoso

Journal volume & issue
Vol. 10

Abstract

Read online

Improving execution time and energy efficiency is needed for many applications and usually requires sophisticated code transformations and compiler optimizations. One of the optimization techniques is memoization, which saves the results of computations so that future computations with the same inputs can be avoided. In this article we present a framework that automatically applies memoization techniques to C/C++ applications. The framework is based on automatic code transformations using a source-to-source compiler and on a memoization library. With the framework users can select functions to memoize as long as they obey to certain restrictions imposed by our current memoization library. We show the use of the framework and associated memoization technique and the impact on reducing the execution time and energy consumption of four representative benchmarks. Keywords: Memoization, Compiler optimizations, Source-to-source