Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A test of various regexp engines
Shell C C++ Python Other
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bwk-src
hs-tcl
p9mk
p9regexp
re1
re2
rxspencer-alpha
spencer-old
tre-src
.gitignore
README
TODO
dfa0.c
dfa1.c
nfa-perl.y
nfa-posix.y
nfa.c
regexp-bytecode.c
regexp-x86.c
times.txt
xagrep
xbwk
xdfa0
xegrep
xgawk
xmawk
xnfa-perl
xnfa-posix
xp9regexp
xpcre
xperl
xpython
xruby
xtcl
xtime

README

The graphs are built from the data in times.txt.

The data in times.txt were gathered by running

	xtime -s xbwk xegrep xgawk xmawk xnfa xpcre \
		xperl xpython xruby xtcl >times.txt

on an idle AMD Athlon 64 2800+ running in 32-bit mode.

To time just one program:

	xtime -s xegrep

xbwk refers to /home/rsc/bin/bwk, which is a copy of
the ``one true awk'' from Brian Kernighan's web site,
compiled with gcc -O2.

xnfa (not included) can be generated by

	gcc -O2 -o xnfa nfa0.c

where nfa0.c is the NFA implementation that can be downloaded
from the web site.

Russ Cox
January 2007
http://swtch.com/~rsc/regexp/

Something went wrong with that request. Please try again.