Performance & Benchmarking Standards

Enforce performance and benchmarking standards for Rust code using Criterion.rs.

115|8|Updated Mar 30, 2025
One-click install
npx skills add https://github.com/Goldziher/spikard --skill performance-benchmarking-standards
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Performance & Benchmarking Standards
Source: https://github.com/Goldziher/spikard/tree/main/.ai-rulez/skills/performance-and-benchmarking-standards
Command: npx skills add https://github.com/Goldziher/spikard --skill performance-benchmarking-standards

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill establishes rigorous standards and practices for measuring and improving the performance of Rust code, ensuring efficient and scalable software.

Core Features & Use Cases

  • Benchmarking Framework: Utilizes Criterion.rs for comprehensive performance measurement, including latency, throughput, and memory allocations.
  • Profiling Tools: Integrates tools like cargo-flamegraph and perf for identifying performance bottlenecks.
  • Optimization Techniques: Promotes zero-copy patterns, buffer reuse, and efficient string handling to minimize overhead.
  • Use Case: A developer needs to ensure a critical data processing function in their Rust application remains performant under load and doesn't introduce regressions after code changes.

Quick Start

Apply the performance and benchmarking standards to the benches/ directory using Criterion.rs.

Frequently Asked Questions about Performance & Benchmarking Standards

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

FAQPage Schema
How do I set up Rust benchmarking to detect performance regressions?

Use Criterion.rs to establish Rust benchmarking standards in the `benches/` directory, measuring latency, throughput, and memory allocations to detect performance regressions in CI/CD pipelines.

What is the best way to profile Rust code for bottlenecks?

Profiling Rust code for bottlenecks is best done using `cargo-flamegraph` and `perf` to visualize execution paths and pinpoint exactly where performance overhead occurs during runtime.

How do I implement zero-copy patterns for memory optimization in Rust?

Implement zero-copy patterns for memory optimization in Rust by applying buffer reuse and efficient string handling techniques, which minimize memory allocation overhead and reduce overall processing latency.

Does Criterion.rs work with CI/CD pipelines for continuous performance measurement?

Criterion.rs works with CI/CD pipelines to enforce consistent performance measurement, allowing you to detect regressions automatically by comparing benchmark results against previous code changes.

When do I need buffer reuse in Rust data processing applications?

You need buffer reuse in Rust data processing applications when critical functions must remain performant under high load, minimizing memory allocations and preventing overhead from repeated data copying.