actionbook avatar

M10 Performance

This is your checklist before you start micro-optimizing Rust code. It walks you through the measurement-first approach: profile with flamegraphs, benchmark with criterion, then prioritize fixes by impact (algorithm choice gets you 10-1000x, allocations maybe 2-5x). The tables map bottlenecks to specific techniques like Vec::with_capacity for pre-allocation or rayon for parallelism. What I like is the explicit trace up to domain constraints and down to implementation skills, so you're not optimizing in a vacuum. It's opinionated about common mistakes (LinkedList is cache-hostile, always benchmark in release mode) and assumes you've already made it work correctly. Good reference when someone says "make it faster" and you need to figure out what that actually means.

skills.sh installs
3.8K
GitHub stars
1.6K
last updated
Aug 21, 2026

Install

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

Installs into .claude/skills of the current project.

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):

Sponsors

Details

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

More from actionbook/rust-skills

All 38

Recommended

More Debugging
1anthropics avatardebug-zoom-integrationanthropics/knowledge-work-pluginsDebug broken Zoom implementations quickly. Use when auth, webhooks, SDK joins, MCP transport, or real-time media workflows are failing and you need to isolate t2.1Kskills.sh installs
2eronred avatarcrash-analyticseronred/aso-skillsWhen the user wants to monitor, triage, or reduce their app's crash rate — including setting up Crashlytics, prioritizing which crashes to fix first, interpreti1.7Kskills.sh installs
3alirezarezvani avatarfixalirezarezvani/claude-skillsFix failing or flaky Playwright tests. Use when user says "fix test", "flaky test", "test failing", "debug test", "test broken", "test passes sometimes", or "in1.6Kskills.sh installs
4charleswiltgen avataraxiom-performancecharleswiltgen/axiomUse when app feels slow, memory grows, battery drains, or diagnosing ANY performance issue. Covers memory leaks, profiling, Instruments workflows, retain cycles1.4Kskills.sh installs
5aj-geddes avatarmobile-app-debuggingaj-geddes/useful-ai-promptsDebug issues specific to mobile applications including platform-specific problems, device constraints, and connectivity issues.568skills.sh installs
6plugin87 avatarperformanceplugin87/ux-ui-agent-skillsOptimize UI performance against Core Web Vitals — LCP, INP, CLS — with loading/code-split strategy, layout-shift prevention, and animation performance rules. Us528skills.sh installs