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.
{"title":"An improved replacement strategy for function caching","authors":"W. Pugh","doi":"10.1145/62678.62719","DOIUrl":"https://doi.org/10.1145/62678.62719","url":null,"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.","PeriodicalId":119710,"journal":{"name":"Proceedings of the 1988 ACM conference on LISP and functional programming","volume":"21 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"1988-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"132930664","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
The typical subroutines that compute sin(x) and exp(x) bear little resemblance to our mathematical knowledge of these functions: they are composed of concrete arithmetic expressions that include many mysterious numerical constants. Instead of programming these subroutines conventionally, we can express their construction using symbolic ideas such as periodicity, Taylor series, and economization. Such an approach has many advantages: the code is closer to the mathematical basis of the function, is less vulnerable to errors, and is trivially adaptable to various precisions.
{"title":"Expressing mathematical subroutines constructively","authors":"Gerald Roylance","doi":"10.1145/62678.62680","DOIUrl":"https://doi.org/10.1145/62678.62680","url":null,"abstract":"The typical subroutines that compute sin(x) and exp(x) bear little resemblance to our mathematical knowledge of these functions: they are composed of concrete arithmetic expressions that include many mysterious numerical constants. Instead of programming these subroutines conventionally, we can express their construction using symbolic ideas such as periodicity, Taylor series, and economization. Such an approach has many advantages: the code is closer to the mathematical basis of the function, is less vulnerable to errors, and is trivially adaptable to various precisions.","PeriodicalId":119710,"journal":{"name":"Proceedings of the 1988 ACM conference on LISP and functional programming","volume":"26 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"1988-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"131862573","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Scheme86 is a computer system designed to interpret programs written in the Scheme dialect of Lisp. A specialized architecture, coupled with new techniques for optimizing register management in the interpreter, allow Scheme86 to execute interpreted Scheme at a speed comparable to that of compiled Lisp on conventional workstations.
{"title":"Scheme86: a system for interpreting scheme","authors":"A. Berlin, Henry M. Wu","doi":"10.1145/62678.62690","DOIUrl":"https://doi.org/10.1145/62678.62690","url":null,"abstract":"Scheme86 is a computer system designed to interpret programs written in the Scheme dialect of Lisp. A specialized architecture, coupled with new techniques for optimizing register management in the interpreter, allow Scheme86 to execute interpreted Scheme at a speed comparable to that of compiled Lisp on conventional workstations.","PeriodicalId":119710,"journal":{"name":"Proceedings of the 1988 ACM conference on LISP and functional programming","volume":"28 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"1988-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"125896209","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Proceedings of the 1988 ACM conference on LISP and functional programming","authors":"J. Chailloux","doi":"10.1145/62678","DOIUrl":"https://doi.org/10.1145/62678","url":null,"abstract":"","PeriodicalId":119710,"journal":{"name":"Proceedings of the 1988 ACM conference on LISP and functional programming","volume":"20 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"1900-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"121722682","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}