good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^3: How to optimize a regex on a large file read line by line ?by RichardK (Parson) |
on Apr 16, 2016 at 16:35 UTC ( [id://1160655]=note: print w/replies, xml ) | Need Help?? |
There's no point trying to optimize your code if you're not sure what your data looks like. However index will be faster than a regex if you're only looking for a fixed string. As other people have recommended, profile your code and find out where the time is going.
In Section
Seekers of Perl Wisdom
|
|