@@ -8,74 +8,58 @@ repository = "https://github.com/rust-lang/regex"
88documentation = " http://doc.rust-lang.org/regex/regex_syntax/index.html"
99homepage = " https://github.com/rust-lang/regex"
1010description = " Regex benchmarks for Rust's and other engines."
11-
1211build = " build.rs"
1312
1413[dependencies ]
14+ docopt = " 0.6"
1515lazy_static = " 0.1"
1616libc = " 0.2"
1717onig = { version = " 0.4" , optional = true }
1818libpcre-sys = { version = " 0.2" , optional = true }
19+ memmap = " 0.2"
1920regex = { version = " 0.1" , path = " .." }
2021regex_macros = { version = " 0.1" , path = " ../regex_macros" , optional = true }
2122regex-syntax = { version = " 0.3" , path = " ../regex-syntax" }
23+ rustc-serialize = " 0.3"
2224
2325[build-dependencies ]
26+ gcc = " 0.3"
2427pkg-config = " 0.3"
2528
29+ [[bin ]]
30+ name = " regex-run-one"
31+ path = " src/main.rs"
32+ bench = false
33+
2634# Use features to conditionally compile benchmarked regexes, since not every
2735# regex works on every engine. Additionally, it is useful to be able to build
2836# each benchmark individually, so that not all dependencies are required to
2937# run only one benchmark.
38+ #
39+ # Note that when running benchmarks, only ONE feature should be set at a time.
40+ # Doing anything else will probably result in weird "duplicate definition"
41+ # compiler errors.
42+ #
43+ # Tip: use the run-bench script in the root of this repository to run
44+ # benchmarks.
3045[features ]
31- re-pcre = [" libpcre-sys" ]
46+ re-pcre1 = [" libpcre-sys" ]
3247re-pcre2 = []
3348re-onig = [" onig" ]
49+ re-re2 = []
3450re-rust = []
3551re-rust-bytes = []
3652re-rust-plugin = [" regex_macros" ]
53+ re-tcl = []
3754
38- # Run the benchmarks on the default behavior of Regex::new.
39- [[bench ]]
40- name = " rust"
41- path = " src/bench_rust.rs"
42- test = false
43- bench = true
44-
45- # Run the benchmarks on the default behavior of bytes::Regex::new.
46- [[bench ]]
47- name = " rust-bytes"
48- path = " src/bench_rust_bytes.rs"
49- test = false
50- bench = true
51-
52- # Run the benchmarks on the default behavior of the `regex!` compiler plugin.
53- [[bench ]]
54- name = " rust-plugin"
55- path = " src/bench_rust_plugin.rs"
56- test = false
57- bench = true
58-
59- # Run the benchmarks on PCRE.
6055[[bench ]]
61- name = " pcre "
62- path = " src/bench_pcre .rs"
56+ name = " bench "
57+ path = " src/bench .rs"
6358test = false
6459bench = true
6560
66- # Run the benchmarks on PCRE2.
67- [[bench ]]
68- name = " pcre2"
69- path = " src/bench_pcre2.rs"
70- test = false
71- bench = true
72-
73- # Run the benchmarks on Oniguruma.
74- [[bench ]]
75- name = " onig"
76- path = " src/bench_onig.rs"
77- test = false
78- bench = true
61+ [profile .release ]
62+ debug = true
7963
8064[profile .bench ]
8165debug = true
0 commit comments