Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Answer: Is it better to return a hash of hashes or a reference to a hash of hashes?

( #117472=categorized answer: print w/ replies, xml ) Need Help??

Q&A > subroutines > Is it better to return a hash of hashes or a reference to a hash of hashes? contributed by merlyn

References are a single item, while lists are the entire list. In terms of speed, it's more expensive to pass a list than an single item. However, "better" is a relative term, so without more context...

Comment on Answer: Is it better to return a hash of hashes or a reference to a hash of hashes?
Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (13)
As of 2015-07-06 22:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (83 votes), past polls