Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
# for now, limit this a bit
revision: ["main", "v38.0.3"]
revision: ["main"]
env:
REVISION: ${{ matrix.revision }}
steps:
Expand Down Expand Up @@ -76,7 +75,7 @@ jobs:
run: |
cargo run benchmark \
--engine=artifacts/wasmtime-main/libengine.so \
--engine=artifacts/wasmtime-v38.0.3/libengine.so \
--engine-flags "-Wgc -Wfunction-references" \
--processes=4 \
--iterations-per-process=1 \
-- "${PARTITION_SUITE}"
Expand Down
67 changes: 34 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions benchmarks/Dockerfile.wasm-tools
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/
1 change: 1 addition & 0 deletions benchmarks/all.suite
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ shootout/shootout-xchacha20.wasm
spidermonkey/spidermonkey-markdown.wasm
spidermonkey/spidermonkey-json.wasm
spidermonkey/spidermonkey-regex.wasm
splay/splay.wasm
tinygo/tinygo-json.wasm
tinygo/tinygo-regex.wasm
tract-onnx-image-classification/benchmark.wasm
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/default.suite
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

bz2/benchmark.wasm
pulldown-cmark/benchmark.wasm
spidermonkey/benchmark.wasm
spidermonkey/spidermonkey-markdown.wasm
Copy link
Copy Markdown
Collaborator

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.

Copy link
Copy Markdown
Member Author

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

1 change: 1 addition & 0 deletions benchmarks/gc.suite
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
splay/splay.wasm
1 change: 1 addition & 0 deletions benchmarks/splay/Dockerfile
29 changes: 29 additions & 0 deletions benchmarks/splay/README.md
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.
1 change: 1 addition & 0 deletions benchmarks/splay/default.input
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8000,800,5
Loading
Loading