Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Slurping BIG files into Hashes

by BazB (Priest)
on Jun 18, 2003 at 18:12 UTC ( #266939=note: print w/ replies, xml ) Need Help??


in reply to Slurping BIG files into Hashes

This does seem a little slow, but it might be down to your hardware.

I perform a similar operation, but on a properly big file: 27 million records, 8 character keys and values.
That only takes about 20 minutes, using exactly the same method as you - substr()'ing out the keys and values from a flat file and stuffing them into a hash.

I can't think of a better way of doing it - unpack is unlikely to be much faster, but you might want to do some benchmarking.


If the information in this post is inaccurate, or just plain wrong, don't just downvote - please post explaining what's wrong.
That way everyone learns.


Comment on Re: Slurping BIG files into Hashes
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (17)
As of 2014-09-22 14:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (196 votes), past polls