Efficient incremental hash computation during program interpretation
问题 I'd like to write a recursively memoizing Scheme interpreter . At any point during evaluation, the interpreter should be able to detect when it receives as arguments a pair of expression and environment that it has previously seen. Plain memoization of eval and apply is inefficient . It would require looking up the arguments in a hash table on every call of eval / apply , which would require walking the entire (possibly big) arguments on hash table matches. For example, assume that the