rust-performance
Measure and optimize Rust latency, throughput, allocation, memory, cache behavior, branches, vectorization, SIMD, code size, and compile time. Use for performance claims or performance-sensitive paths. Do not add complexity for hypothetical gains without a representative measurement.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-15
- Stars
- ★ 2
- Forks
- 0
01 前言 Front Matter
- name
- rust-performance
- description
- Measure and optimize Rust latency, throughput, allocation, memory, cache behavior, branches, vectorization, SIMD, code size, and compile time. Use for performance claims or performance-sensitive paths. Do not add complexity for hypothetical gains without a representative measurement.
02 资源文件 3
- 参考文档agents/openai.yaml244 B
- 参考文档references/performance.md7.3 KB
- 其他skill.toml1.2 KB
03 SKILL.md 正文
Engineer Rust Performance
Define the claim
- Read
$rust-core, repository budgets, supported hardware and features, existing profiles, correctness tests, and the actual call path. - Read performance workflow.
- Record whether the path is measured, workload size and distribution, execution frequency, latency and throughput goals, allocation and memory behavior, cache and branch implications, vectorization, code-size impact, and compile-time impact.
Measure before changing
Preserve a correct readable reference implementation when optimization obscures reasoning. Use a benchmark whose every iteration performs the same declared workload. Record target, CPU, toolchain, features, build profile, samples, and noise controls. Measure the shipped artifact for size work.
Consider algorithm and data movement before unsafe, SIMD, parallelism, or
micro-optimization. Route harness correctness to $rust-testing, parallel
ownership to $rust-async-concurrency, unsafe optimization to
$rust-unsafe-ffi, and domain equivalence to its owner.
Accept a change only with evidence
Normally require before-and-after measurements, preserved correctness tests, tradeoff analysis, and a reproduction command. Reject clear-code regressions for hypothetical gains. State when a platform-specific path retains a correct fallback.
Output
Provide the measurement brief, raw comparison, uncertainty, correctness evidence, complexity and portability cost, code/compile-size impact, and recommendation.
04 同仓库更多 Skills
rust-unsafe-ffi
Design and review unsafe Rust, safe wrappers, manual Send or Sync, ABI boundaries, foreign ownership, callbacks, and FFI build integration. Use whenever unsafe code or a foreign interface is introduced, changed, or relied upon. Do not use unsafe merely to bypass borrow checking or for unmeasured optimization.
rust-testing
Select, implement, and assess Rust unit, integration, documentation, property, fuzz, snapshot, concurrency, unsafe, protocol, benchmark, and verification evidence. Use whenever behavior changes or claims need proof. Do not run every tool mechanically when the repository or risk makes it inapplicable.
rust-skill-maintenance
Maintain this modular Rust skills system, including canonical content, manifests, references, profiles, generated adapters, migrations, examples, evaluations, releases, and compatibility. Use when changing the skills repository itself. Do not hand-edit generated adapters.
rust-review
Review Rust diffs, commits, branches, and designs for actionable correctness, soundness, security, compatibility, concurrency, protocol, performance, testing, and maintainability risks. Use for review or pre-merge assessment. Do not modify code unless separately requested.
rust-repository-onboarding
Inspect, interview, profile, configure, and install the modular Rust engineering skills into a repository. Use when adopting or refreshing these skills, generating repository-specific Rust rules, or creating validation workflows. Never finalize policy before repository inspection and user approval.
rust-protocol
Engineer and review binary protocols, wire formats, builders, encoders, parsers, framing, stateful messages, bit ordering, integrity, correction, malformed input, and conformance. Use for protocol or serializer code. Do not apply protocol rules to unrelated in-memory models.