bench-fast

Generate assembly output for benchmarks using BenchmarkDotNet's DisassemblyDiagnoser with minimal iterations.

604|41|Updated Jun 11, 2020
One-click install
npx skills add https://github.com/bitfaster/BitFaster.Caching --skill bench-fast
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: bench-fast
Source: https://github.com/bitfaster/BitFaster.Caching/tree/main/.claude/skills/bench-fast
Command: npx skills add https://github.com/bitfaster/BitFaster.Caching --skill bench-fast

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Benchmarks require long iterations to generate meaningful data and readable assembly outputs; bench-fast focuses on a minimal-iteration workflow to produce a single, large assembly file per benchmark for analysis.

Core Features & Use Cases

  • Minimal iterations to quickly generate a large assembly dump per benchmark.
  • Disassembly output via BenchmarkDotNet's DisassemblyDiagnoser for low-level code visibility.
  • Multi-runtime support to compare assembly across different .NET runtimes.

Quick Start

Use the bench-fast skill to run a benchmark with minimal iterations to generate a disassembly file.

/bench-fast <BenchmarkName> [<Runtimes>]

If a runtime arg is specified, execute: dotnet run -c Release --project BitFaster.Caching.Benchmarks --framework net9.0 -- --runtimes <Runtimes> --filter "<BenchmarkName>" -j short --warmupCount 3 --iterationCount 5 -d --disasmDepth 5

If no runtime is specified, omit that arg: dotnet run -c Release --project BitFaster.Caching.Benchmarks --framework net9.0 -- --filter "<BenchmarkName>" -j short --warmupCount 3 --iterationCount 5 -d --disasmDepth 5

Frequently Asked Questions about bench-fast

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate assembly output for .NET benchmarks quickly?▼

To generate assembly output quickly, use minimal-iteration benchmarks with BenchmarkDotNet's DisassemblyDiagnoser. This workflow uses short warmup and iteration counts to rapidly produce a single large disassembly file per benchmark for low-level code analysis.

What is the best way to compare assembly across different .NET runtimes?▼

Comparing assembly across different .NET runtimes requires specifying target runtimes as an argument. The benchmark executes against each runtime sequentially, generating distinct assembly dumps that highlight low-level execution differences for performance analysis.

Can I use BenchmarkDotNet to get disassembly output without running long iterations?▼

Yes, you can get disassembly output without long iterations by configuring BenchmarkDotNet with a short job specification. Setting low warmup and iteration counts enforces minimal execution time while still triggering the DisassemblyDiagnoser to produce the assembly dump.

How do I filter specific benchmarks when generating a disassembly dump?▼

Filtering specific benchmarks when generating a disassembly dump is done by passing a filter argument. This targets only the specified benchmark name, ensuring the DisassemblyDiagnoser generates a single large assembly file containing just the requested method's low-level code.

Why does my benchmark produce unreadable assembly output?▼

Unreadable assembly output often results from insufficient disassembly depth. Setting a specific disassembly depth argument ensures the generated assembly file captures the correct level of recursive method inlining and JIT optimizations for accurate performance analysis.

Does bench-fast work with BitFaster.Caching benchmarks?▼

Yes, bench-fast works with BitFaster.Caching benchmarks by executing the project in Release configuration. It targets the .NET 9.0 framework to apply minimal-iteration workflows and generate the required disassembly dumps for caching performance analysis.