Richard Gaskin wrote:
I hope I didn't give the impression that repeat for each is always
faster than RegEx.
No, not at all.
The trick is finding the precise dividing line, the code complexity/data
complexity/depth ratio that benefits one method over another. If there
was a quantified
services. See http://economy-x-
talk.com/server.html for more info.
On 25 jul 2008, at 03:27, -= JB =- wrote:
I downloaded a stack a while back that had a bunch
of scripts in it that would do things like strip chars
and various other goodies. I can't remember who
wrote it or the name of it so I
RegEx solutions are conveniently compact to write, but given the
complexity of the RegEx subsystem they tend to be slower than more
brute-force solutions.
Being a benchmarking fan I couldn't resist testing this latest case,
extracting numerals from an alphanumeric string.
Below is a test
That is interesting and nice.
I have only run one test but it was mixed pretty good
my result was 94 67 with the repeat for each being the
fastest method.
Thanks to both Mark Richard for the valuable help.
-=JB=-
On Jul 25, 2008, at 7:06 AM, Richard Gaskin wrote:
RegEx solutions are
-= JB =- wrote:
That is interesting and nice.
I have only run one test but it was mixed pretty good
my result was 94 67 with the repeat for each being the
fastest method.
I had a discussion with Mark Waddingham about this when I was preparing
my RevLive session on working with text. There
J. Landman Gay wrote:
I had a discussion with Mark Waddingham about this when I was preparing
my RevLive session on working with text. There is no absolute faster
method when comparing regex commands with repeat loops. It all depends
on what's in the data, and the engine is optimized
I downloaded a stack a while back that had a bunch
of scripts in it that would do things like strip chars
and various other goodies. I can't remember who
wrote it or the name of it so I can't find it.
Does anyone know the name of a stack that has
sample code that allows me to strip everything
-talk.com
http://www.salery.biz
Benefit from our inexpensive hosting services. See http://economy-x-talk.com/server.html
for more info.
On 25 jul 2008, at 03:27, -= JB =- wrote:
I downloaded a stack a while back that had a bunch
of scripts in it that would do things like strip chars
and various