|Keep It Simple, Stupid|
fast string parser: regex versus substrby mce (Curate)
|on Nov 20, 2003 at 16:09 UTC||Need Help??|
mce has asked for the
wisdom of the Perl Monks concerning the following question:
I want to find a way to parse a string in a real performant way. This is what I came up with.
Now, in a simple benchmark study, the doregex function is 3 times faster than the substr. But it just look so complex doesn't it.
So, I am asking the wisdom for my fellow monks to make it more performant.
I am talking about a data of thousands of lines and every second counts, as my operators don't like to wait for webpages :-) Thanks in advance,
Update: fixed substr value to correct Abigail-II comment
Dr. Mark Ceulemans