AW: Re: Regex help needed...

Bernard Devlin bdrunrev at gmail.com
Wed Feb 3 06:53:29 EST 2016


Hi Mark,

There's huge differences in how regex implementations perform in different
languages. For example: http://raid6.com.au/~onlyjob/posts/arena/

Perl outperforms everything in that test. I've never assumed that LC's
"perl compatiable regex library" is going to perform at the speed which
actual Perl performs. I've always assumed that being "perl compatible" just
meant that all syntactically-correct Perl regexs should run with LC's
implementation, without needing any kind of change in how the regex is
formatted.

There was an academic paper I came across 15 years ago, which showed that
Tcl out-performed Perl. Now it seems Perl outperforms Tcl, suggesting that
one or the other has made changes to their underlying engine which impact
regex performance. Or that the tests I read about 15 years ago were just
testing regex features which resulted in Tcl out-performing Perl, and
vice-versa in the above test.

It would be great if LC's implementation was as fast as Perl's.

Here's a page comparing several implementations of PCRE (with some non-pcre
regex implementations): http://sljit.sourceforge.net/regex_perf.html

One of the things we had in LC5 which was phenomenally fast, was searching
through the styledText of a field. That fast way of searching particular
text structures got lost in the migration to LC8.

Regards
Bernard



More information about the use-livecode mailing list