Why not maintain a hash table whose values are offsets into the flat environment? Then it's a cheap branch or two on lookup to see: 1) is there a hash table; 2) should I build one (is the env big enough, and have there been enough lookups).
I call that serious overhead. Environments come and go at an amazing pace. Most lookups are already immediate (do not involve a search). In some cases (non-recursive, safe functions), I can save the environment and reuse it, so some analysis might be acceptable. I doubt that applies here because apparently the optimizer already threw up its hands.
(Environments in s7 are very dynamic -- I do not currently try to keep the env's length stored somewhere, and to get it is nearly as bad as a linear search). _______________________________________________ Cmdist mailing list [email protected] https://cm-mail.stanford.edu/mailman/listinfo/cmdist
