Does Common Lisp have the fastest PCRE implementation?

A friend claimed that Common Lisp has the fastest Perl-compatible regular expression library of any language, including Perl , because with an optimizing JIT compiler like SBCL, CL-PPCRE can compile each particular regular expression before its own assembly, while other implementations, including Perl, must generate bytecode and interpret it. In practice, especially for the normal case, when we try to match the same regular expression with many inputs or long inputs, the compilation overhead is more than justified.

Unfortunately, I can’t find any tests on this, and I don’t know enough to run my own, so I turn to the hives. Can anyone rate this requirement?

+6
performance perl pcre common-lisp jit
source share
2 answers

I do not have my own tests, but perhaps your friend referred to the results regarding the portable regular expression library CL-PPCRE . The current web page no longer speaks of benchmarks, but is kindly provided by the Wayback Machine , we can see that it used to show test results when CL-PPCRE exceeded Perl 2-to-1 expectations. Benchmarking is a complex business (especially for moving purposes) that can explain why the current page was silent on this issue.

+4
source share

The PCRE library now has a JIT compiler module, and it has good performance compared to other regular expressions: http://sljit.sourceforge.net/regex_perf.html or http://blog.rburchell.com/2011/12/why -i-avoid-qregexp-in-qt-4-and-so.html

+1
source share

All Articles