Regular expressions performance: Boost vs. Perl

后端 未结 7 1979
梦谈多话
梦谈多话 2021-02-04 08:02

I\'m looking for a performance comparison between perl and boost regular expression.
I need to design a piece of code which relies very heavily on regular expressions, and c

7条回答
  •  梦毁少年i
    2021-02-04 08:48

    If you haven't seen it yet, there's a regexp benchmark in the Great Language Shootout. It doesn't rank Perl very high at all. A Boost implementation using boost::xpressive is ranked first (which pre-compiles the expression at compile time). However, this is a microbenchmark, so probably not representative of general regular expression speed, but still worth a look.

    Surprisingly enough, apparently the fastest regular expression engine by far is Google Chrome's V8 JavaScript JIT (almost beats GCC in wall-clock time, utilizing just a single CPU core)

提交回复
热议问题