Skip to content

Commit d9cdd0b

Browse files
feat: v0.7.0 (#13)
* Remove all unsafe code * Refactor interpreter loop * Optimize Call-frames * Remove unnecessary reference counter data from store --------- Signed-off-by: Henry Gressmann <[email protected]>
1 parent e771c6d commit d9cdd0b

33 files changed

+1615
-994
lines changed

.cargo/config.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,8 @@ test-wast="test --package tinywasm --test test-wast -- --enable "
77
test-wast-release="test --package tinywasm --test test-wast --release -- --enable "
88
generate-charts="run --package scripts --bin generate-charts --release"
99
benchmark="bench -p benchmarks --bench"
10+
11+
# # enable for linux perf
12+
# [target.x86_64-unknown-linux-gnu]
13+
# linker="/usr/bin/clang"
14+
# rustflags=["-Clink-arg=-fuse-ld=lld", "-Clink-arg=-Wl,--no-rosegment"]

BENCHMARKS.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Benchmark results
22

33
All benchmarks are run on a Ryzen 7 5800X with 32GB of RAM on Linux 6.6.
4-
WebAssembly files are optimized using [wasm-opt](https://github.com/WebAssembly/binaryen),
4+
WebAssembly files are optimized using [wasm-opt](https://github.com/WebAssembly/binaryen) (with the `--O3` flag)
55
and the benchmark code is available in the `crates/benchmarks` folder.
66

77
These are mainly preliminary benchmarks, and I will be rewriting the benchmarks to be more accurate and to test more features in the future.
@@ -20,7 +20,6 @@ All WebAssembly files are compiled with the following settings:
2020

2121
All runtimes are compiled with the following settings:
2222

23-
- `unsafe` features are enabled.
2423
- `opt-level` is set to 3, `lto` is set to `thin`, `codegen-units` is set to 1.
2524
- No CPU-specific optimizations are used as AVX2 can reduce performance by more than 50% on some CPUs.
2625

@@ -34,9 +33,9 @@ All runtimes are compiled with the following settings:
3433

3534
| Benchmark | Native | TinyWasm | Wasmi | Wasmer (Single Pass) |
3635
| ------------ | -------- | ---------- | --------- | -------------------- |
37-
| `fib` | `0ms` | ` 19.09µs` | `18.53µs` | ` 48.09µs` |
38-
| `fib-rec` | `0.27ms` | ` 22.22ms` | ` 4.96ms` | ` 0.47ms` |
39-
| `argon2id` | `0.53ms` | ` 86.42ms` | `46.36ms` | ` 4.82ms` |
36+
| `fib` | `0ms` | ` 18.70µs` | `18.53µs` | ` 48.09µs` |
37+
| `fib-rec` | `0.27ms` | ` 16.02ms` | ` 4.96ms` | ` 0.47ms` |
38+
| `argon2id` | `0.53ms` | ` 80.54ms` | `46.36ms` | ` 4.82ms` |
4039
| `selfhosted` | `0.05ms` | ` 7.26ms` | ` 6.51ms` | `446.48ms` |
4140

4241
### Fib

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.7.0] - 2024-05-15
9+
10+
**All Commits**: https://github.com/explodingcamera/tinywasm/compare/v0.6.0...v0.7.0
11+
12+
### Changed
13+
14+
- Remove all unsafe code
15+
- Refactor interpreter loop
16+
- Optimize Call-frames
17+
- Remove unnecessary reference counter data from store
18+
819
## [0.6.1] - 2024-05-10
920

1021
**All Commits**: https://github.com/explodingcamera/tinywasm/compare/v0.6.0...v0.6.1

0 commit comments

Comments
 (0)