if a hash is useful depends on the problem. Hashes are good when you have a 
_big_ dictionary which does not change (much). If you have only some elements 
in the dictionary, then the costs for calculating the hash values might be 
higher than the costs for some compares. And don't forget the costs for 
building the hash like you did!

But if you care about performance than I would think you should use another 
design. For me it sounds strange to build the symbol lookup according to the 
call-stack. I would make my lookup table for each scope once (at parse/compile) 
and than just pass a ref to that scope at runtime

Reply via email to