skip to main content
10.1145/62678.62719acmconferencesArticle/Chapter ViewAbstractPublication PageslfpConference Proceedingsconference-collections
Article
Free Access

An improved replacement strategy for function caching

Published:01 January 1988Publication History

ABSTRACT

Function caching is the technique of remembering previous function calls and avoiding the cost of recomputing them. Function caching provides a simple way of implementing dynamic programming algorithms and can provide a facility for incremental computation. Previous discussions of function caching have generally relied on the user to purge items from the function cache or have proposed a strategy such as least-recently-used without any analysis of the appropriateness of that strategy. We describe a formal model that allows us to describe the potential of a function cache and use that model to develop a practical cache replacement strategy that performs substantially better than currently used strategies. Benchmarks show that in use in an incremental theorem prover, our caching strategy produces almost a factor of four improvement in running time over a system running without function caching and almost a factor of two improvement in running time over a system using a standard cache replacement strategy.

References

  1. All78.John Allen, Anatomy of LISP, McGraw Hill Book Company, NY, 1976. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Coh79.Norman Cohen, Characterization and Elimination of Redundancy in Recursive Programming, Conference Record of the 6th ACM Symposium on Principles of Programming Languages, 1979. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. FWW76.D. Friedman, D. Wise and M. Wand, Recursive Programming through Table Look-up, Proceedings of the 1976 ACM Symposium on Symbolic and Algebraic Computation Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Hil76.J. Hilden, Elimination of recursive calls using a small table of 'randomly' selected function values, BIT, Vo116 no. 1, pp60-73 (1976)Google ScholarGoogle ScholarCross RefCross Ref
  5. Hug85.John Hughes, Lazy Memo-functions, Functional Programming Languages and Computer Archlitecture, 1985 Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. KS86.Robert M. Keller and M. Ronan Sleep. Applicative caching, ACM Transactions on Programming Languages and Systems, Vol. 8, No. 1, pp. 88-I06 (|anuary 1986). Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Mic68.Donald Michie, "Memo" Functions and .Machine Learning, Nature, No. 218, pp19-22 (April 1968)Google ScholarGoogle Scholar
  8. MC85.Jack Mostow and Donald Cohen, Automating Program Speedup by Deciding What to Cache, Proc. of the Ninth International Joint Conference on Artificial Intelligence, 18-23 August, 1985, Vol. 1, pp 165-172.Google ScholarGoogle Scholar
  9. Pug88.William Pugh, Incremental Computation and the Incremental Evaluation of Functional Programs, Ph.D. Thesis, Cornell University, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. RT84.Tom Reps and Tim Teitelbaum, The Synthesizer Generator, Proceedings of the ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments, Pittsburgh, Penn, (Apt 84). Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Rob87.Arch Robison, The Illinois Functional Programming Interpreter, Proceedings ofthe SIGPLAN 87 Symposium on Interpreters and Interpretive Techniques, June 87 Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. An improved replacement strategy for function caching

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in
        • Published in

          cover image ACM Conferences
          LFP '88: Proceedings of the 1988 ACM conference on LISP and functional programming
          January 1988
          351 pages
          ISBN:089791273X
          DOI:10.1145/62678

          Copyright © 1988 ACM

          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: 1 January 1988

          Permissions

          Request permissions about this article.

          Request Permissions

          Check for updates

          Qualifiers

          • Article

          Acceptance Rates

          Overall Acceptance Rate30of109submissions,28%

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader