SKILL.md
Rust Benchmarks Skill
Run Rust benchmarks and compare performance with the C implementation.
Arguments
<crate>: Run the given benchmark crate (e.g.,/run-rust-benchmarks rqeiteratorsbencher)<crate> <bench>: Run specific bench in a benchmark crate (e.g.,/run-rust-benchmarks rqeiteratorsbencher "Iterator - InvertedIndex - Numeric - Read Dense")
Arguments provided: $ARGUMENTS
Instructions
- Check the arguments provided above:
- If a crate name is provided, run benchmarks for that crate: ``bash cargo bench --manifest-path src/redisearchrs/Cargo.toml -p <cratename> ` - If both crate and bench name are provided, run the specific bench: `bash cargo bench --manifest-path src/redisearchrs/Cargo.toml -p <cratename> <bench_name> ``
- Run benchmarks only once. If the output is too large or truncated, extract the timing data from the saved output file rather than re-running the benchmarks.
- Once the benchmarks are complete, generate a summary comparing the average run times between the Rust and C implementations.
- Ask the user: "Would you like a copyable markdown version for your PR description?" If yes, re-emit the summary table inside a fenced
`markdowncode block so it can be pasted directly.
Common Benchmark Commands
# Bench given crate
cargo bench --manifest-path src/redisearch_rs/Cargo.toml -p rqe_iterators_bencher
cargo bench --manifest-path src/redisearch_rs/Cargo.toml -p inverted_index_bencher
# Run a specific benchmark
cargo bench --manifest-path src/redisearch_rs/Cargo.toml -p rqe_iterators_bencher "Iterator - InvertedIndex - Numeric - Read Dense"