Skip to content
This repository was archived by the owner on Oct 3, 2025. It is now read-only.

Commit 7f99f96

Browse files
docs: update benchmarks
Signed-off-by: Henry Gressmann <[email protected]>
1 parent dea9327 commit 7f99f96

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

BENCHMARKS.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,22 @@ All runtimes are compiled with the following settings:
2222

2323
## Versions
2424

25-
- `tinywasm`: `0.4.0`
26-
- `wasmi`: `0.31.0`
27-
- `wasmer`: `4.2.0`
25+
- `tinywasm`: `0.4.1`
26+
- `wasmi`: `0.31.2`
27+
- `wasmer`: `4.2.5`
2828

2929
## Results
3030

31-
| Benchmark | Native | TinyWasm | Wasmi | Wasmer (Single Pass) |
32-
| ------------ | ------ | -------- | -------- | -------------------- |
33-
| `fib` | 6ns | 44.76µs | 48.96µs | 52µs |
34-
| `fib-rec` | 284ns | 25.565ms | 5.11ms | 0.50ms |
35-
| `argon2id` | 0.52ms | 110.08ms | 44.408ms | 4.76ms |
36-
| `selfhosted` | 45µs | 2.08ms | 4.25ms | 258.87ms |
31+
| Benchmark | Native | TinyWasm\* | Wasmi | Wasmer (Single Pass) |
32+
| ------------ | -------- | ---------- | --------- | -------------------- |
33+
| `fib` | \*\* | ` 44.11µs` | `49.46µs` | ` 50.65µs` |
34+
| `fib-rec` | `0.26ms` | ` 24.91ms` | ` 4.62ms` | ` 0.49ms` |
35+
| `argon2id` | `0.53ms` | `109.38ms` | `45.85ms` | ` 4.82ms` |
36+
| `selfhosted` | `0.05ms` | ` 2.07ms` | ` 4.26ms` | `260.32ms` |
37+
38+
_\* converting WASM to TinyWasm bytecode is not included. 7.2.ms is the time it takes to convert `tinywasm.wasm` to TinyWasm bytecode._
39+
40+
_\*\* essentially instant as it gets computed at compile time._
3741

3842
### Fib
3943

crates/benchmarks/benches/selfhosted.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ fn criterion_benchmark(c: &mut Criterion) {
6161
{
6262
let twasm = util::wasm_to_twasm(TINYWASM);
6363
let mut group = c.benchmark_group("selfhosted");
64-
// group.bench_function("native", |b| b.iter(run_native));
64+
group.bench_function("native", |b| b.iter(run_native));
6565
group.bench_function("tinywasm", |b| b.iter(|| run_tinywasm(&twasm)));
66-
// group.bench_function("wasmi", |b| b.iter(|| run_wasmi(TINYWASM)));
67-
// group.bench_function("wasmer", |b| b.iter(|| run_wasmer(TINYWASM)));
66+
group.bench_function("wasmi", |b| b.iter(|| run_wasmi(TINYWASM)));
67+
group.bench_function("wasmer", |b| b.iter(|| run_wasmer(TINYWASM)));
6868
}
6969
}
7070

0 commit comments

Comments
 (0)