rust-optimise

📁 pproenca/dot-skills 📅 Feb 14, 2026
25
总安装量
25
周安装量
#14813
全站排名
安装命令
npx skills add https://github.com/pproenca/dot-skills --skill rust-optimise

Agent 安装分布

codex 22
gemini-cli 21
github-copilot 21
claude-code 19
opencode 19
kimi-cli 19

Skill 文档

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

Priority Category Impact Prefix
1 Memory Allocation CRITICAL mem-
2 Ownership & Borrowing CRITICAL own-
3 Data Structure Selection HIGH ds-
4 Iterator & Collection Patterns HIGH iter-
5 Async & Concurrency MEDIUM-HIGH async-
6 Algorithm Complexity MEDIUM algo-
7 Compile-Time Optimization MEDIUM comp-
8 Micro-optimizations LOW micro-

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