m10-performance

Profile Rust code with cargo bench and flamegraph to identify and optimize performance bottlenecks.

Updated Jan 29, 2026
One-click install
npx skills add https://github.com/CallMeLuigiv2/Socratic-IDE --skill m10-performance-callmeluigiv2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: m10-performance
Source: https://github.com/CallMeLuigiv2/Socratic-IDE/tree/main/.agents/skills/m10-performance
Command: npx skills add https://github.com/CallMeLuigiv2/Socratic-IDE --skill m10-performance-callmeluigiv2

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers identify and eliminate Rust performance bottlenecks, enabling faster, more efficient code without guesswork.

Core Features & Use Cases

  • Profiling & Benchmarking: Use flamegraph and criterion to locate hotspots and measure improvements.
  • Optimized Code Patterns: Apply memory- and cache-friendly techniques to critical paths.
  • Real-World Scenario: You have a Rust project with slow allocations and lengthy compute; use this Skill to reduce runtime while preserving correctness.

Quick Start

Start by running cargo bench to establish a baseline, generate a flamegraph for the target hot path, then iteratively apply optimizations and re-benchmark to verify gains.

Frequently Asked Questions about m10-performance

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

FAQPage Schema
How do I find performance bottlenecks in my Rust project?

Find Rust performance bottlenecks by running cargo bench to establish a baseline, then generate a flamegraph for the target hot path to visually locate code segments consuming the most execution time. This pinpoints exact lines needing optimization.

What is the best way to optimize slow allocations and compute in Rust?

Optimize slow allocations and compute in Rust by applying memory- and cache-friendly techniques to critical paths identified during profiling, then re-benchmark with cargo bench to verify runtime reductions while preserving correctness.

Can I use flamegraph and criterion to measure Rust performance improvements?

Yes, you can use flamegraph and criterion to measure Rust performance improvements by locating hotspots and establishing baselines, allowing you to iteratively apply optimizations and verify execution gains through continuous benchmarking.

Do I need cargo bench to start optimizing Rust execution speed?

Yes, you need cargo bench to start optimizing Rust execution speed because it establishes the performance baseline required to measure the impact of any memory- or cache-friendly refactoring applied to the critical paths.

Why does my Rust code have slow runtime after profiling?

Your Rust code has slow runtime after profiling if memory- and cache-friendly techniques have not been applied to the critical paths, meaning the bottlenecks identified by the flamegraph still require iterative refactoring and re-benchmarking.