http://qs321.pair.com?node_id=11128357


in reply to do separate hashes share common keys?

Yes, each interpreter has what's called the shared string table, which is a big hash which uses every key currently in use by most hashes, using a reference counting mechanism. So if you create 1000 objects with the same key "foobar", there will be a single 'HEK' entry in the shared table for the string "foobar", and all the individual hashes will have a pointer to it.

Note that it is (mostly) unrelated to the Copy-on-Write mechanism.

Dave.