-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #224 from abrown/regex-benchmark
Add a regular expression benchmark
- Loading branch information
Showing
10 changed files
with
206,338 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM rust:1.67 | ||
|
||
RUN rustup target add wasm32-wasi | ||
WORKDIR /usr/src | ||
ADD rust-benchmark rust-benchmark | ||
WORKDIR /usr/src/rust-benchmark | ||
RUN cargo build --release --target wasm32-wasi | ||
RUN cp target/wasm32-wasi/release/regex-wasm-benchmark.wasm /benchmark.wasm | ||
# We output the Wasm file to /benchmark.wasm, where the client expects it. |
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,15 @@ | ||
This regular expression benchmark measures the time taken to match e-mails, | ||
URIs, and IP addresses in an input text. It is written in Rust and can be | ||
re-compiled using the `Dockerfile` (see [`build.sh`]). | ||
|
||
It is significantly adapted from the [regex-benchmark] project, which is [MIT] | ||
licensed. The [`default.input`] text is a concatenation of [Learn X in Y | ||
minutes] which is published under the [Creative Commons Attribution-ShareAlike | ||
3.0 Unported] license. | ||
|
||
[`build.sh`]: ../build.sh | ||
[regex-benchmark]: https://github.com/mariomka/regex-benchmark | ||
[MIT]: https://github.com/mariomka/regex-benchmark/blob/master/LICENSE | ||
[`default.input`]: ./default.input | ||
[Learn X in Y minutes]: https://github.com/adambard/learnxinyminutes-docs | ||
[Creative Commons Attribution-ShareAlike 3.0 Unported]: http://creativecommons.org/licenses/by-sa/3.0/deed.en_US |
Binary file not shown.
Oops, something went wrong.