Details

Machine: Intel Pentium 4 2.8GHz PC.

Compiler: Microsoft Visual C++ version 7.1.

C++ Standard Library: Dinkumware standard library version 313.

OS: Win32.

Boost version: 1.31.0.

PCRE version: 3.9.

As ever care should be taken in interpreting the results, only sensible regular
expressions (rather than pathological cases) are given, most are taken from the
Boost regex examples, or from the Library of
Regular Expressions. In addition, some variation in the relative
performance of these libraries can be expected on other machines - as memory
access and processor caching effects can be quite large for most finite state
machine algorithms.

Averages

The following are the average relative scores for all the tests: the perfect
regular expression library would score 1, in practice any small number
(say less that 4 or 5) is pretty good.

GRETA

GRETA
(non-recursive mode)

Boost

Boost + C++ locale

POSIX

PCRE

2.31619

6.14203

2.30668

1.94363

124.752

2.09365

Comparison 1: Long Search

For each of the following regular expressions the time taken to find all
occurrences of the expression within a long English language text was measured
(mtent12.txt
from Project Gutenberg, 19Mb).