Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
laziness, impatience, and hubris
 
PerlMonks  

Re: Better way of accessing fields

by pbeckingham (Parson)
on Mar 18, 2004 at 14:36 UTC ( [id://337781]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Better way of accessing fields

The access via array versus hashref would be faster, but only by a very small amount. I realize that those small amounts multiply up into larger delays, but we are talking very, very small improvements to some code that is paired up with a database query. Such small improvements do add up, but it loses the significance when paired with a database query, which is at least two orders of magnitude slower than a hash lookup, and maybe 4.

It is like packing one less T-shirt in your suitcase to save weight, when there's also a bowling ball in there.

Then again, even when it may not be necessary, optimization can be a fun pursuit, and good practice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://337781]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.