Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
Makefile Initial commit Added sample regular expressions in README
howto.xz Initial commit
test-pcre.c Initial commit

PCRE JIT benchmark

Sample data and regular expressions are taken from Benchmark of Regex Libraries. The benchmark source code was also taken from there and modified to use pcre native APIs and the PCRE_STUDY_JIT_COMPILE option. See "man pcrejit"

Tested environment: CentOS 6.3 on VirtualBox 4.2.6, MacBook Pro 2012, Core i7 2.6GHz, 16GB 1600MHz DDR3 RAM, Apple SSD

Sample regular expressions:

  • URI (protocol://server/path): ([a-zA-Z][a-zA-Z0-9]*)://([^ /]+)(/[^ ]*)?
  • Email (name@server): ([^ @]+)@([^ @]+)
  • Date (month/day/year): ([0-9][0-9]?)/([0-9][0-9]?)/([0-9][0-9]([0-9][0-9])?)
  • URI|Email: ([a-zA-Z][a-zA-Z0-9]*)://([^ /]+)(/[^ ]*)?|([^ @]+)@([^ @]+)
URI Email Date URI | Email
PCRE 7.8 no jit 0.365s 0.218s 0.203s 7.477s
PCRE 8.32 no jit 0.348s 0.211s 0.197s 6.885s
-0.017s -0.007s -0.006s -0.592s
-4.7% -3.2% -3.0% -7.9%
PCRE 8.32 jit 0.200s 0.166s 0.175s 1.184s
-0.148s -0.045s -0.022s -5.701s
-42.5% -21.3% -11.2% -82.8%
Something went wrong with that request. Please try again.