Computer Science Department
School of Computer Science, Carnegie Mellon University


Adaptive Memoization

Umut A. Acar, Guy E. Blelloch, Robert Harper

November 2003

Keywords: Incremental computing, functional languages, dynamic algorithms, adaptivity, memoization

We combine adaptivity and memoization to obtain an incremental computation technique that dramatically improves performance over adaptivity and memoization alone. The key contribution is adaptive memoization, which enables result re-use by matching any subset of the function arguments to a previous function call and updating the result to satisfy the unmatched arguments via adaptivity.

We study the technique in the context of a purely functional language, called IFL, and as an ML library. The library provides an efficient implementation of our techniques with constant overhead. As examples, we consider Quicksort and Insertion Sort. We show that Quicksort handles insertions or deletions at random positions in the input list in O(log n) expected time. For insertion sort, we show that insertions and deletions anywhere in the list take O(n) time.

34 pages

Return to: SCS Technical Report Collection
School of Computer Science homepage

This page maintained by