J
Johannes Fürnkranz
Hi,
I don't have the 3rd edition of the Camel-book, so pardon me if this is
covered there:
Can anybody explain the purpose of Hash::Util::lock_keys to me?
I would have expected that this does something like internally convert
the hash to an array and/or provide faster access to the hash elements
by somehow avoiding to compute the hashing function for each element. I
tested this with Benchmark, but I could not find any noticable
difference between retrieving a key from a locked hash or a regular
hash. The only difference I note is, of course, the error message that I
get when I try to access an undefined slot of the locked hash. Is that all?
thx, Juffi
I don't have the 3rd edition of the Camel-book, so pardon me if this is
covered there:
Can anybody explain the purpose of Hash::Util::lock_keys to me?
I would have expected that this does something like internally convert
the hash to an array and/or provide faster access to the hash elements
by somehow avoiding to compute the hashing function for each element. I
tested this with Benchmark, but I could not find any noticable
difference between retrieving a key from a locked hash or a regular
hash. The only difference I note is, of course, the error message that I
get when I try to access an undefined slot of the locked hash. Is that all?
thx, Juffi