forked from rust-lang/regex
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add RE2 and TCL to the benchmark harness.
This also adds a new utility, regex-run-one, to the benchmark suite. This utility is a CLI tool that lets one count the number of regex matches for any of the regex engines in the benchmark harness. e.g., regex-run-one tcl '\w{5}z\w{5}' my-file Will count the number of times the regex '\w{5}z\w{5}' matches in my-file. Supported engines are: pcre1, pcre2, onig, re2, rust, rust-bytes and tcl.
- Loading branch information
1 parent
4332c9c
commit 4fab6c1
Showing
28 changed files
with
2,131 additions
and
563 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh | ||
|
||
exec cargo build \ | ||
--release \ | ||
--features 're-onig re-pcre1 re-pcre2 re-re2 re-rust re-rust-bytes re-tcl' \ | ||
"$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
|
||
usage() { | ||
echo "Usage: $(basename $0) [rust | rust-bytes | rust-plugin | pcre1 | pcre2 | re2 | onig | tcl ]" >&2 | ||
exit 1 | ||
} | ||
|
||
if [ $# = 0 ] || [ $1 = '-h' ] || [ $1 = '--help' ]; then | ||
usage | ||
fi | ||
|
||
which="$1" | ||
shift | ||
case $which in | ||
rust) | ||
exec cargo bench --bench bench --features re-rust "$@" | ||
;; | ||
rust-bytes) | ||
exec cargo bench --bench bench --features re-rust-bytes "$@" | ||
;; | ||
rust-plugin) | ||
exec cargo bench --bench bench --features re-rust-plugin "$@" | ||
;; | ||
re2) | ||
exec cargo bench --bench bench --features re-re2 "$@" | ||
;; | ||
pcre1) | ||
exec cargo bench --bench bench --features re-pcre1 "$@" | ||
;; | ||
pcre2) | ||
exec cargo bench --bench bench --features re-pcre2 "$@" | ||
;; | ||
onig) | ||
exec cargo bench --bench bench --features re-onig "$@" | ||
;; | ||
tcl) | ||
exec cargo bench --bench bench --features re-tcl "$@" | ||
;; | ||
*) | ||
usage | ||
;; | ||
esac |
Oops, something went wrong.