Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: code execution speed and variable name length

by demerphq (Chancellor)
on Jul 30, 2004 at 16:11 UTC ( #378729=note: print w/replies, xml ) Need Help??


in reply to Re: code execution speed and variable name length
in thread code execution speed and variable name length

so he doens't consider the added cost of storing lots of big keys.

Just wanted to add to this that keys in perl are reused. A key is stored only once, regardless of how many hashes it is used in. So while there is obviously an additional cost of using longer keys it doesnt mean that you will thousands of that key in memory if you have thousands of hashes that have that key within them. This also explains why hash keys are not normal scalar values (SV's).

I believe that it was Gurusamy Sarathy that did the work whit the intention of making hash based objects more memory efficient.


---
demerphq

    First they ignore you, then they laugh at you, then they fight you, then you win.
    -- Gandhi


  • Comment on Re^2: code execution speed and variable name length

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2022-12-02 10:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?