-
Notifications
You must be signed in to change notification settings - Fork 36
Add a splay Wasm GC benchmark
#307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6807946
Fix default suite's reference to SpiderMonkey
fitzgen d726468
Add a `splay` Wasm GC benchmark
fitzgen f83f9af
Use Dockerfile for build
fitzgen dc06417
Update wasmparser dep
fitzgen aad7714
Run benchmarks with GC enabled in CI
fitzgen 373b02c
Only build wasmtime@main because GC support in the bench API is new
fitzgen 36ff4b8
fix reference to no-long-built wasmtime version
fitzgen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or 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 @@ | ||
| FROM rust:1.95 | ||
|
|
||
| # Install `wasm-tools` | ||
| ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse | ||
| RUN cargo install wasm-tools --version 1.247.0 | ||
|
|
||
| WORKDIR /usr/src | ||
| ADD . benchmark-src | ||
| WORKDIR /usr/src/benchmark-src | ||
|
|
||
| # Run `wasm-tools wat2wasm` on each `.wat` file. | ||
| RUN for x in *.wat; do wasm-tools wat2wasm "$x" -o "${x%.wat}.wasm"; done | ||
|
|
||
| RUN mkdir /benchmark | ||
| RUN cp *.wasm /benchmark/ |
This file contains hidden or 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 hidden or 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 hidden or 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 @@ | ||
| splay/splay.wasm |
This file contains hidden or 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 @@ | ||
| ../Dockerfile.wasm-tools |
This file contains hidden or 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,29 @@ | ||
| # Splay | ||
|
|
||
| A splay tree benchmark, ported to WebAssembly text format (WAT) using Wasm GC | ||
| structs and arrays. It stresses the performance of the garbage collector. | ||
|
|
||
| ## Origin | ||
|
|
||
| The original JavaScript source is from [JetStream's Octane/splay.js][source]; a | ||
| similar version was previously published in Octane version 2, and it originally | ||
| came from the V8 JavaScript engine project. | ||
|
|
||
| [source]: https://github.com/WebKit/JetStream/blob/main/Octane/splay.js | ||
|
|
||
| ## Running | ||
|
|
||
| Requires that `-Wgc -Wfunction-references` be passed to the underlying engine: | ||
|
|
||
| ``` | ||
| cargo run -- benchmark \ | ||
| -e path/to/libwasmtime_bench_api.{so,dylib} \ | ||
| --engine-flags="-Wgc -Wfunction-references" \ | ||
| -- benchmarks/splay/splay.wasm | ||
| ``` | ||
|
|
||
| ## License | ||
|
|
||
| The original JavaScript source (`splay.js`) is copyright 2009 the V8 project | ||
| authors and copyright 2015 Apple Inc., licensed under a BSD 3-clause license. | ||
| See the header of `splay.js` for the full license text. |
This file contains hidden or 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 @@ | ||
| 8000,800,5 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I assume this was a goof from my previous set of patches. I'm assuming we don't want splay here? Probably just a fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we probably want splay in the default suite at some point, but I kind of want to do that as part of a larger clean up pass of all of our benchmarks and defaults