Loading...
Loading...
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-refactor skill).
npx skill4agent add pproenca/dot-skills rust-optimise| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 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 | |
mem-avoid-unnecessary-clonemem-preallocate-vec-capacitymem-use-cow-for-conditional-ownershipmem-use-arc-for-shared-immutable-datamem-avoid-format-for-simple-concatenationmem-use-smallvec-for-small-collectionsown-accept-str-slice-not-stringown-accept-slice-not-vecown-use-into-for-flexible-ownershipown-return-borrowed-when-possibleown-use-asref-for-generic-borrowsds-use-hashset-for-membershipds-use-hashmap-for-key-lookupds-use-btreemap-for-sorted-iterationds-use-vecdeque-for-queue-operationsds-use-entry-api-for-conditional-insertiter-chain-instead-of-intermediate-collectiter-use-iter-over-into-iter-when-borrowingiter-use-filter-map-for-combined-operationsiter-use-flat-map-for-nested-iterationiter-use-extend-for-bulk-appenditer-use-fold-for-accumulationasync-avoid-blocking-in-async-contextasync-use-join-for-concurrent-futuresasync-use-rwlock-over-mutex-for-read-heavyasync-minimize-lock-scopeasync-use-buffered-for-bounded-concurrencyasync-avoid-holding-lock-across-awaitalgo-avoid-nested-loops-for-lookupalgo-use-binary-search-for-sorted-dataalgo-use-sort-unstable-when-order-irrelevantalgo-use-select-nth-unstable-for-partial-sortalgo-use-chunks-for-batch-processingcomp-use-const-for-compile-time-computationcomp-prefer-static-dispatchcomp-reduce-monomorphization-bloatcomp-use-const-generics-for-array-sizescomp-avoid-repeated-parsing-of-static-datamicro-use-inline-for-small-functionsmicro-avoid-bounds-checks-in-hot-loopsmicro-use-wrapping-arithmetic-when-safemicro-use-byte-literals-for-asciirust-refactor