>>>>> "DS" == Dan Sugalski <[EMAIL PROTECTED]> writes:

>> Why precomputed? Any 'interned' string has a unique value (e.g. address).
>> Though wouldn't they have to be garbage collected? Short lived hashes
>> with constantly changing keys, the shared hash keys would keep growing.

DS> I'm thinking of a central store for text constants used as hash keys. (How 
DS> many times do we use AUTOLOAD in perl 5, for example?) Something reasonably 
DS> automagic, such that we don't have to go recompute hash values every 
DS> fscking time we access something with a hash value known at program compile 
DS> time. (Or perl compile time, for that matter)

DS> I'm also wondering if attaching a hash value to SVs would be a performance 
DS> win--probably not, but it's tempting to check and see.

Well, if having a dual-natured string/number is a win, then the first
time a string is used as a hash, the hash value could be saved.

But the biggest win would probably be compile time hash values. 

Hmm,

my @values : forKeys = qw( .... );


<chaim>
-- 
Chaim Frenkel                                        Nonlinear Knowledge, Inc.
[EMAIL PROTECTED]                                               +1-718-236-0183

Reply via email to