Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Array of Hashes vs. Array of Arrays vs Array of Lines vs ...

by andyford (Curate)
on Aug 30, 2007 at 14:35 UTC ( [id://636096]=note: print w/replies, xml ) Need Help??


in reply to Array of Hashes vs. Array of Arrays vs Array of Lines vs ...

I would think that "keeping it in memory" would be dependent on how much memory you have. If you have plenty, then perl will have no problem reading in the whole file and you should use whatever data structure fits how you're gonna use it. If you don't have enough memory you could try Tie::File to effortlessly access the lines while leaving the data on disk. Trying to optimize via different data structures is probably a waste of time and also probably counter productive.

non-Perl: Andy Ford

  • Comment on Re: Array of Hashes vs. Array of Arrays vs Array of Lines vs ...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (1)
As of 2024-04-25 00:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found