Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Index a file with pack for fast accessby BrowserUk (Patriarch) |
on Dec 16, 2011 at 23:07 UTC ( [id://944026]=note: print w/replies, xml ) | Need Help?? |
This creates an index file with the '.idx' appended to the name of the input file:
And this loads the appropriate index file for its input argument and the reads 100 records at random:
And here is a console log with timings of indexing a 1gb file containing 16 million records and then reading a 100 records at random via that index:
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|