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.
In reply to Re: How to speed up/multi thread extract from txt files?
by perrin
in thread How to speed up/multi thread extract from txt files?
by MelaOS
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |