Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: do separate hashes share common keys?

by dave_the_m (Monsignor)
on Feb 14, 2021 at 09:53 UTC ( #11128357=note: print w/replies, xml ) Need Help??


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.

  • Comment on Re: do separate hashes share common keys?

Replies are listed 'Best First'.
Re^2: do separate hashes share common keys?
by LanX (Sage) on Feb 14, 2021 at 13:24 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11128357]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2022-01-21 06:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (57 votes). Check out past polls.

    Notices?