in reply to Hash Internals

So is efficiency the main reason why the hashes are not tied internally?

And if so, does Tie::IxHash slow things down a lot? and i'm asking this question assuming that the algorithm mentioned above is similar to the method used in the Tie::IxHash.

Replies are listed 'Best First'.
RE: Re: Hash Internals
by japhy (Canon) on Oct 19, 2000 at 16:36 UTC
    Yes, the method I described is VERY similar to Tie::IxHash, if not the same. I wrote my own implementation to see if I understood it (and did a presentation on it at YAPC 19100. Ordered hashes are slow because you totally disregard the work the hashing algorithm does to make the accesses fast. And because the setup uses those three data structures, and there's not one that maps key to value, you have to first use the hash to get key to index, and then use the array of values to get index to value. Ick.

    $_="goto+F.print+chop;\n=yhpaj";F1:eval