in reply to How to speed up/multi thread extract from txt files?

The mistake you're making here is trying to optimize without any idea what is actually slowing it down. Give it a run with Devel::DProf and then you'll know.

When I worked on a similar problem, I found that most of the time was spent reading lines from disk, not doing the regexes. I sped it up by using the sliding window technique to read in larger chunks.

  • Comment on Re: How to speed up/multi thread extract from txt files?