Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: speeding up a file-based text search

by perrin (Chancellor)
on May 08, 2003 at 19:25 UTC ( #256646=note: print w/replies, xml ) Need Help??


in reply to speeding up a file-based text search

Just to follow up on this for posterity, I adapted the "sliding window" technique using sysread to read in 16K chunks, and then crawl through them with index() looking for lines that I should check more thoroughly. After some tuning, this provided about a 300% speed improvement. Good enough, and not that much effort required.
  • Comment on Re: speeding up a file-based text search

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (2)
As of 2020-10-26 18:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (252 votes). Check out past polls.

    Notices?