> rust-optimise

Rust performance optimization covering memory allocation, ownership efficiency, data structure selection, iterator patterns, async concurrency, algorithm complexity, compile-time optimization, and micro-optimizations. Use when optimizing Rust code performance, profiling hot paths, reducing allocations, or choosing optimal data structures. Complements the rust-refactor skill (idiomatic patterns and architecture). Does NOT cover code style, naming conventions, or project organization (see rust-ref

fetch
$curl "https://skillshub.wtf/pproenca/dot-skills/rust-optimise?format=md"
SKILL.mdrust-optimise

Rust Optimise Best Practices

Performance optimization guide for Rust applications. Contains 42 rules across 8 categories, prioritized by impact from critical (memory allocation, ownership) to incremental (micro-optimizations).

When to Apply

  • Optimizing Rust code for performance or reducing allocations
  • Choosing data structures for optimal algorithmic complexity
  • Working with iterators to avoid unnecessary intermediate allocations
  • Writing async code with Tokio or other runtimes
  • Profiling hot paths and eliminating performance bottlenecks
  • Reviewing code for performance anti-patterns

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Memory AllocationCRITICALmem-
2Ownership & BorrowingCRITICALown-
3Data Structure SelectionHIGHds-
4Iterator & Collection PatternsHIGHiter-
5Async & ConcurrencyMEDIUM-HIGHasync-
6Algorithm ComplexityMEDIUMalgo-
7Compile-Time OptimizationMEDIUMcomp-
8Micro-optimizationsLOWmicro-

Quick Reference

1. Memory Allocation (CRITICAL)

2. Ownership & Borrowing (CRITICAL)

3. Data Structure Selection (HIGH)

4. Iterator & Collection Patterns (HIGH)

5. Async & Concurrency (MEDIUM-HIGH)

6. Algorithm Complexity (MEDIUM)

7. Compile-Time Optimization (MEDIUM)

8. Micro-optimizations (LOW)

References

  1. https://nnethercote.github.io/perf-book/
  2. https://rust-lang.github.io/api-guidelines/
  3. https://doc.rust-lang.org/nomicon/
  4. https://tokio.rs/tokio/tutorial

Related Skills

  • For idiomatic patterns, architecture, and code organization, see rust-refactor skill

┌ stats

installs/wk0
░░░░░░░░░░
github stars80
██████████
first seenMar 17, 2026
└────────────

┌ repo

pproenca/dot-skills
by pproenca
└────────────

┌ tags

└────────────