New advertisers: 50% off your first month with code FIRSTMONTHSee slots
actionbook avatar

M10 Performance

Rust performance guidance that stresses profiling first, then maps bottlenecks to allocation, cache, parallelism, and algorithm fixes.

skills.sh installs
4K
GitHub stars
1.6K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers the optimization workflow from profiling and benchmarking through choosing algorithm, data structure, allocation, cache, and parallelism changes
  • Includes a priority ladder ranking algorithm choice above data structures, allocation reduction, cache layout, and SIMD or parallelism
  • Provides tools and techniques for measuring hotspots, including cargo bench, criterion, perf, flamegraph, heaptrack, and cachegrind
  • Designed for Rust work where a performance target or latency requirement must be met before changes are justified

Install

$ npx -y skills add actionbook/rust-skills --skill m10-performance -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Performance Optimization

Layer 2: Design Choices

Core Question

What's the bottleneck, and is optimization worth it?

Before optimizing:

  • Have you measured? (Don't guess)
  • What's the acceptable performance?
  • Will optimization add complexity?

Performance Decision → Implementation

GoalDesign ChoiceImplementation
Reduce allocationsPre-allocate, reusewith_capacity, object pools
Improve cacheContiguous dataVec, SmallVec
ParallelizeData parallelismrayon, threads
Avoid copiesZero-copyReferences, Cow<T>
Reduce indirectionInline datasmallvec, arrays

Thinking Prompt

Before optimizing:

  1. Have you measured?

    • Profile first → flamegraph, perf
    • Benchmark → criterion, cargo bench
    • Identify actual hotspots
  2. What's the priority?

    • Algorithm (10x-1000x improvement)
    • Data structure (2x-10x)
    • Allocation (2x-5x)
    • Cache (1.5x-3x)
  3. What's the trade-off?

    • Complexity vs speed
    • Memory vs CPU
    • Latency vs throughput

Trace Up ↑

To domain constraints (Layer 3):

Details

Repository
github.com/actionbook/rust-skills
Categories
Rust, Debugging
First seen
May 16, 2026

More from actionbook/rust-skills

All 38

Similar to M10 Performance

More Rust