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
4 changes: 2 additions & 2 deletions benchmarks/runtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ This is a collection of runtime benchmarks for the code generated by `bon` crate
If you'd like to run the benchmarks yourself, first you need to install the following:

- `Valgrind`. Its `cachegrind` component is used by [`gungraun`](https://github.com/gungraun/gungraun) benchmark to display the instruction counts and cache/RAM hits.
- `cargo-asm`. It's used to get the resulting assembly code for the benchmarked functions.
- [`cargo-show-asm`](https://github.com/pacak/cargo-show-asm). It's used to get the resulting assembly code for the benchmarked functions.

If you are on Ubuntu or Debian, just run the following commands to install the dependencies:

```bash
cargo install cargo-asm gungraun-runner@$(cargo pkgid gungraun | cut -d@ -f2)
cargo install cargo-show-asm gungraun-runner@$(cargo pkgid gungraun | cut -d@ -f2)
sudo apt install valgrind
```

Expand Down
4 changes: 2 additions & 2 deletions benchmarks/runtime/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ for bench in $benches; do

# If vscode is present, show diff:
if command -v code; then
cargo asm --features "$bench" --no-color "runtime_benchmarks::$bench::builder_bench" > builder.dbg.s || true
cargo asm --features "$bench" --no-color "runtime_benchmarks::$bench::regular_bench" > regular.dbg.s || true
cargo asm --features "$bench" -p runtime-benchmarks --lib "runtime_benchmarks::$bench::builder_bench" > builder.dbg.s || true
cargo asm --features "$bench" -p runtime-benchmarks --lib "runtime_benchmarks::$bench::regular_bench" > regular.dbg.s || true

code --diff regular.dbg.s builder.dbg.s
fi
Expand Down
Loading