diff --git a/benchmarks/runtime/README.md b/benchmarks/runtime/README.md index 2bb3e4ee..2d213c69 100644 --- a/benchmarks/runtime/README.md +++ b/benchmarks/runtime/README.md @@ -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 ``` diff --git a/benchmarks/runtime/run.sh b/benchmarks/runtime/run.sh index aeb5d704..30ca01a6 100755 --- a/benchmarks/runtime/run.sh +++ b/benchmarks/runtime/run.sh @@ -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