AW: Re: Regex help needed...
Peter Haworth
pete at lcsql.com
Wed Feb 3 15:10:12 EST 2016
Hi Thierry,
I might have missed it but did you publish your Regex2 to the list?
Pete
On Wed, Feb 3, 2016 at 12:07 PM Richard Gaskin <ambassador at fourthworld.com>
wrote:
> Thierry Douez write:
>
> >> Regex has been around a long time
> >> and lots of smart computer science types has
> >> spent time coming up with ways to optimize its performance for pattern
> >> matching.
> >
> > That's was true, it's still true and will always be true!
>
> It's true that there are almost always ways to improve performance using
> any method, but there are times when one method may be faster than
> another so it's worth testing out, as you did here:
>
> > and here are some benchmarks
> > done in a late rainy sunday evening:
> >
> >
> > * Regex2 faster than Chunk by: 2.1 times*
>
> Great results - what was the regex you used for that?
>
>
> > For the details:
> >
> > 1) Regex1 is the original regex, Chunk1 is from Richard, Regex2 is mine.
> > 2) You can noticed the difference in time depending on the value of pPage
> > ( that's a normal behavior with regex)
> > 3) I've done the calculation the same way as Richard did, so you can
> compare
> >
> >
> >
> > ****** aPage = 1, Same? true true
> > Regex1: 8943 ms
> > Chunk1: 210 ms
> > Regex2: 99 ms
> > Regex2 faster than orig regex by: 90.3 times
> > Regex2 faster than Chunk by: 2.1 times
> >
> > ****** aPage = 2, Same? true true
> > Regex1: 9946 ms
> > Chunk1: 212 ms
> > Regex2: 100 ms
> > Regex2 faster than orig regex by: 99.5 times
> > Regex2 faster than Chunk by: 2.1 times
> >
> > ****** aPage = 3, Same? true true
> > Regex1: 4451 ms
> > Chunk1: 210 ms
> > Regex2: 98 ms
> > Regex2 faster than orig regex by: 45.4 times
> > Regex2 faster than Chunk by: 2.1 times
> >
> > ****** aPage = 4, Same? true true
> > Regex1: 11465 ms
> > Chunk1: 200 ms
> > Regex2: 98 ms
> > Regex2 faster than orig regex by: 117 times
> > Regex2 faster than Chunk by: 2 times
> >
> > ****** aPage = 5, Same? true true
> > Regex1: 11457 ms
> > Chunk1: 201 ms
> > Regex2: 94 ms
> > Regex2 faster than orig regex by: 121.9 times
> > Regex2 faster than Chunk by: 2.1 times
> >
>
> --
> Richard Gaskin
> Fourth World Systems
> Software Design and Development for the Desktop, Mobile, and the Web
> ____________________________________________________________________
> Ambassador at FourthWorld.com http://www.FourthWorld.com
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
More information about the use-livecode
mailing list