rust-performance
Installation
SKILL.md
Rust Performance
Measure speed, heap use, binary size, and build time on the host, Android, and iOS. The rust-hot-path skill, when it is installed, turns a named hotspot into a code change; the rust-observability skill owns tracing spans and structured timing in production.
Rules of engagement
- Name one metric (items/s, MB/s, ms per pass, peak MB, bundle KB) and record a baseline before you change code. A change without a before and an after number is a guess.
- Measure the build that ships;
devnumbers do not transfer. On the host, profile theprofilingprofile below (release plus symbols). On a device, profile the ship profile with line tables and no strip. - Change one thing per measurement, on the same machine, power state, and device.
- Fix the algorithm or the data structure before you tune build flags.
Build a profile that the profiler can read
A profile without symbols shows hex addresses and truncated stacks. A release build has no debug info (Cargo passes -C strip=debuginfo whenever debug is off, as of Cargo 1.99.1). Define this profile once in the workspace-root Cargo.toml: