Stavros Macrakis wrote:
>>Assume r and s are in the hash table. To do (hcons r s) you
>>look at the address of r and address of s, and make the hash
>>code from this.
>>
>
>This is assuming that addresses are stable. I'd think that at least
>some of the current CL implementations use relocating garbage
>collectors.
>
Actually it doesn't use the addresses, just whatever eq-hashtables use.
>
>
>>What is interesting about this is one can use the hash table
>>idea to (for example) store all the simplified expressions,
>>or all expressions with some property. Thus instead of
>>tagging an expression with "simplified" or "factored" one
>>can use a hash table.
>>
>
>Presumably the big win comes because you never have to resimplify the
>same thing twice. Though you do have to worry about whether the
>environment (global settings etc.) is the same....
>
Yes, that is one application. The other (more important) application is
that
the ordering functions in the simplifier become trivial.
log(log(log(x))) and
log(log(log(log(x)))) can be sorted once, and you don't have to examine
either
of them, after that, to see which has more logs.
RJF
>
>
> -s
>
>