The following benchmark suites are included, some of which required modifications to work with WASM/WASI:
polybench: Polybench; 90 benchmarks (30 benchmarks x 3 sizes)mibench: Mibench; 35 benchmarks (18 benchmarks having small and large sizes except one)cortex: UCSD CortexSuite, excluding the San Diego Vision Benchmark suite; 24 benchmarks (8 benchmarks x 3 sizes)vision: San Diego Vision Benchmark Suite; 27 benchmarks (9 benchmarks x 3 sizes)libsodium: Libsodium Benchmarks, available pre-compiled here; 70 benchmarks (15 benchmark types, various configurations per type)apps: benchmarks made from common real-world applications:python: the CPython interpreter compiled to WASM running 12 python scripts taken from the Codon benchmark suite. Note that WASM/WASI-compiled python currently does not support pip-installed modules; complicated imports are also somewhat flaky.ffmpeg: FFmpeg standalone executable compiled to WASM, supportingzlibandx264with 6 different operations.lua: Lua interpreter, running 5 different scripts; requires WALI instead of only WASI to run.sqlite3: SQLite running 5 different queries; requires WALI.
-
Install the WASI SDK:
wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/wasi-sdk-20.0-linux.tar.gz tar xvf wasi-sdk-20.0-linux.tar.gz sudo cp -r wasi-sdk-20.0 /opt/wasi-sdk
-
Build benchmarks:
make: build all benchmarks; saved to./wasm. Any necessary data files are saved to./data. Since paths are hard-coded into benchmarks, benchmarks must be executed with./benchmarksas a WASI pre-opened directory (or equivalently,wasmanddatain WASI working directory).MODE=native make: build all benchmarks natively using gcc for comparison; saved to./native.make {benchmark}: make benchmark suites individually.make clean: remove./wasmand./data.