Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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?

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2015-11-26 12:33 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (698 votes), past polls