3 ms·
Most dynamic languages use a C Regular Expression library. That's why they can do so well on Regular Expression benchmarks. V8 is a notable exception. They use
by enneff 15y ago
Most dynamic languages use a C Regular Expression library. That's why they can do so well on Regular Expression benchmarks.
V8 is a notable exception. They use their code generation pipeline to JIT compile regexps to machine code, making it the fastest regexp engine around bar none (I think).
- azakai 15y agoAFAIK all modern JS engines JIT regexps: V8, SpiderMonkey and Nitro.
- silentbicycle 15y agoWhat about LPEG? It has a superset of the functionality of most regexp engines, yet is able to handle many things linearly that they would handle in quadratic time.
- pavpanchekha 15y agoI'd like to put in a word for CL-PPCRE, the Common Lisp regex library. It does the same except using the CL optimizing compiler, so also achieves amazing speed. Libraries don't appear in the Comp.Lang.Benchmark Shootout, so CL doesn't do so well.