Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Slurping BIG files into Hashes

by BazB (Priest)
on Jun 18, 2003 at 18:12 UTC ( [id://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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-24 09:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found