Proceedings of the fourteenth annual ACM symposium on Principles of distributed computing
Developing a tool for memoizing functions in C++
ACM SIGPLAN Notices
Incremental evaluation for attribute grammars with application to syntax-directed editors
POPL '81 Proceedings of the 8th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Precise Identification of Side-Effect-Free Methods in Java
ICSM '04 Proceedings of the 20th IEEE International Conference on Software Maintenance
Proceedings of the 32nd ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Adaptive functional programming
ACM Transactions on Programming Languages and Systems (TOPLAS)
Versioned boxes as the basis for memory transactions
Science of Computer Programming - Special issue: Synchronization and concurrency in object-oriented languages
Dynamic purity analysis for java programs
PASTE '07 Proceedings of the 7th ACM SIGPLAN-SIGSOFT workshop on Program analysis for software tools and engineering
STMBench7: a benchmark for software transactional memory
Proceedings of the 2nd ACM SIGOPS/EuroSys European Conference on Computer Systems 2007
A lock-free cache invalidation protocol for the atom system
Proceedings of the compilation of the co-located workshops on DSM'11, TMC'11, AGERE!'11, AOOPES'11, NEAT'11, & VMIL'11
ACM SIGOPS Operating Systems Review
Hi-index | 0.00 |
Memoization is a well-known technique for improving the performance of a program, but it has been confined mostly to functional programming, where no mutable state or side-effects exist. Most object-oriented programs, however, are built around objects with an internal state that is mutable over the course of the program. Therefore, the execution of methods often depends on the internal state of some objects or produces side-effects, thus making the application of memoization impractical for object-oriented programs in general. In this paper, we propose an extended memoization approach that builds on the support provided by a Software Transactional Memory (STM) to identify both internal state dependencies and side-effects, hence removing many of the limitations of traditional memoization. We describe the Automatic Transaction-Oriented Memoization (ATOM) system, a thread-safe implementation of our memoization model that requires minimal learning effort from programmers, while offering a simple and customizable interface. Additionally, we describe a memoization advisory system that collects per-method performance statistics with the ultimate goal of aiding programmers in their task of choosing which methods are profitable to memoize. We argue that ATOM is the first memoization system adequate to the unique characteristics of object-oriented programs and we show how memoization can be implemented almost for free in systems that use an STM, presenting the reasons why this synergy can be particularly useful in transactional contexts. We show the usefulness of memoizing object-oriented programs by applying memoization to the STMBench7 benchmark, a standard benchmark developed for evaluating STM implementations. The memoized version of the benchmark shows up to a 14-fold increase in the throughput for a read-dominated workload.