Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 ( #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
Node Status?
node history
Node Type: note [id://636096]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2017-03-30 17:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (362 votes). Check out past polls.