Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

PrevUpHomeNext

Testing simple Perl matches (platform = Windows x64, compiler = Microsoft Visual C++ version 14.0)

Table 12. Testing simple Perl matches (platform = Windows x64, compiler = Microsoft Visual C++ version 14.0)

Expression
Text

boost 1.60

PCRE-10.10

RE2

std::regex

boost::xpressive::cregex

([[:digit:]]{4}[- ]){3}[[:digit:]]{3,4}
1234-5678-1234-456

2.03
(323ns)

1.25
(198ns)

1.00
(159ns)

20.73
(3296ns)

1.38
(220ns)

^([0-9]+)(\-| |$)(.*)$
100- this is a line of ftp response which contains a message string

1.71
(257ns)

2.01
(302ns)

2.38
(357ns)

30.81
(4622ns)

1.00
(150ns)

^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\ ...
bob.smith@foo.tv

2.66
(404ns)

2.09
(317ns)

1.00
(152ns)

38.14
(5798ns)

1.87
(284ns)

^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\ ...
foo12@foo.edu

2.90
(406ns)

2.31
(323ns)

1.00
(140ns)

41.41
(5797ns)

2.00
(280ns)

^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\ ...
john@johnmaddock.co.uk

2.74
(477ns)

2.17
(378ns)

1.00
(174ns)

38.15
(6638ns)

2.20
(382ns)

^[-+]?[[:digit:]]*\.?[[:digit:]]*$
+3.14159

1.63
(171ns)

1.14
(120ns)

1.13
(119ns)

34.15
(3586ns)

1.00
(105ns)

^[-+]?[[:digit:]]*\.?[[:digit:]]*$
-3.14159

1.69
(171ns)

1.18
(119ns)

1.18
(119ns)

35.54
(3590ns)

1.00
(101ns)

^[-+]?[[:digit:]]*\.?[[:digit:]]*$
123

1.60
(149ns)

1.15
(107ns)

1.10
(102ns)

39.99
(3719ns)

1.00
(93ns)

^[[:digit:]]{1,2}/[[:digit:]]{1,2}/[[:digit:]]{4}$
12/12/2001

1.65
(162ns)

1.00
(98ns)

1.31
(128ns)

16.57
(1624ns)

1.03
(101ns)

^[[:digit:]]{1,2}/[[:digit:]]{1,2}/[[:digit:]]{4}$
4/1/2001

1.58
(153ns)

1.00
(97ns)

1.19
(115ns)

16.54
(1604ns)

1.02
(99ns)

^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$
EH10 2QQ

1.57
(170ns)

1.00
(108ns)

1.10
(119ns)

21.83
(2358ns)

1.00
(108ns)

^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$
G1 1AA

1.50
(159ns)

1.01
(107ns)

1.05
(111ns)

17.67
(1873ns)

1.00
(106ns)

^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$
SW1 1ZZ

1.53
(164ns)

1.00
(107ns)

1.07
(115ns)

18.05
(1931ns)

1.00
(107ns)

abc
abc

2.10
(128ns)

1.00
(61ns)

1.30
(79ns)

9.89
(603ns)

1.25
(76ns)



PrevUpHomeNext