mirror of
https://gitee.com/openharmony/third_party_rust_regex
synced 2025-04-07 12:41:46 +00:00

Neither of them were particularly competitive and they make building the benchmark harness more trouble than it's worth.
40 lines
785 B
Bash
Executable File
40 lines
785 B
Bash
Executable File
#!/bin/bash
|
|
|
|
usage() {
|
|
echo "Usage: $(basename $0) [rust | rust-bytes | 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 "$@"
|
|
;;
|
|
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
|