From: Asfand Yar Qazi Date: 2003-12-24T09:06:51+09:00 Subject: Re: Does String cache its 'hash' return value? Florian Frank wrote: > On Tue, 2003-12-23 at 01:56, Asfand Yar Qazi wrote: > >>What I mean is, if I repeatedly call a String's hash method (i.e. like >>using it regularly to access a Hash) will the hash value get >>recalculated every time? > > > Yes, it will. Have you considered unsing Symbols instead of Strings? > The hash value "calculation" of a Symbol is O(1). > Depends... if Symbols are used as the keys for a hash table, can they be as easily accessed from extension modules as if Strings were used? -- http://www.it-is-truth.org/