4 ms·
Here are the results of some sample benchmarks. These are the same as those used in the paper "Regular Expression Matching in the Wild" by Russ Cox [1]. 500
by alexkon 16y ago
Here are the results of some sample benchmarks. These are the same as those used in the paper "Regular Expression Matching in the Wild" by Russ Cox [1].
500 MB file, regex: .*$
pcre 31.67 MB/s
re2 242.28 MB/s
pire 756.32 MB/s
500 MB file, regex: ABCDEFGHIJKLMNOPQRSTUVWXYZ$
pcre 153.67 MB/s
re2 653.76 MB/s
pire 755.98 MB/s
2 MB file, regex: (\d{3}-|\(\d{3}\)\s+)(\d{3}-\d{4})$
re2 423,76 MB/s
pire 775,89 MB/s
Source: Yandex, the company where PIRE originated. [2] (Russian)
[1] http://swtch.com/~rsc/regexp/regexp3.html http://swtch.com/~rsc/regexp/regexp3.html
[2] http://clubs.ya.ru/company/replies.xml?item_no=30753 http://clubs.ya.ru/company/replies.xml?item_no=30753
- xentronium 16y agoThere're two more interesting things mentioned in the article which originated in yandex: https://github.com/highpower/xiva https://github.com/highpower/xiva -- asynchronous web-server for server-side part of html5 websockets https://github.com/khanton/NwSMTP https://github.com/khanton/NwSMTP -- they say it's a "nginx for SMTP", a proxy server they use for providing ssl, rbl, antispam and antivirus checks.