Re:Rejit: a work-in-progress JIT-powered regex engine
by haberman on Sunday February 14, 2016 @01:10PM
(#11099231)
> re2c is probably just as fast in practice, i'd imagine.
Probably, but re2c requires every pattern to be run through a C compiler. Not useful if you want to use it as the embedded regex engine inside a language interpreter.
Also recent iterations of Intel processors contain specialized string-scanning instructions -- I would love to see engines that can take advantage of these. It would be hard for C compilers to recognize these patterns, I think, without explicit use of intrinsics: http://blog.reverberate.org/2009/07/gazelle-is-going-to-love...
Re:Rejit: a work-in-progress JIT-powered regex engine
by sitkack on Monday February 15, 2016 @04:20AM
(#11102333)
libtcc, http://bellard.org/tcc/
Re:Rejit: a work-in-progress JIT-powered regex engine
by pcwalton on Sunday February 14, 2016 @01:48PM
(#11099410)
> re2c is probably just as fast in practice, i'd imagine.
Actually, no, not if you count compilation time (which you should, in a dynamic language setting).
Re:Rejit: a work-in-progress JIT-powered regex engine
by sitkack on Monday February 15, 2016 @04:22AM
(#11102342)
I'll have to add it to my backlog of benchmarks to do, but tcc could compile C source @ ~30MB/s on a Pentium 4. http://bellard.org/tcc/#speed
https://github.com/coreperf/rejit