rust-performance
Rust performance workflow: benchmark and profile first, identify hotspots, reduce allocations and contention, improve data layout, tune release profiles, and verify gains with repeatable evidence. Use only after you have a real Rust performance symptom, regression, or hotspot in `.rs` code.
v2026.11.13-21cd5683 installs+3 in 7 days39 StarsMITsynced 11 hours ago
Install
No NotHoly CLI yet? Install it first.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install aeondave/rust-performanceWrites to ~/.notholy/skills after checking the signature and the SHA-256.
SignatureSigned, ed25519
Package818635e3…e0d1c8cb
818635e3c0b3…77fee0d1c8cb6 files · 9.6 KBScanLowno findings
Sourcegithub.com/AeonDave/malskill/tree/main/coding/rust-performance@21cd568
On this page
This skill is about measurement-first optimization in Rust.
If the task is primarily code style, ownership, or API design, use rust-patterns first.
When to activate
- Investigating latency, throughput, CPU, memory, or allocation regressions in Rust
- Benchmarking a hot path before and after a change
- Hunting down lock contention, slow async pipelines, or poor data layout
- Tuning release profiles or deciding whether parallelism actually helps
Rules of engagement
- Measure before changing code. Hot takes are not hot paths.
- Change one variable at a time. Keep a stable baseline and compare before vs after.
- Fix algorithm and data-structure issues first, then allocations, then micro-optimizations.
- Optimize the code you can prove is hot, not the code that merely looks suspicious.
- Preserve correctness, readability, and maintainability; fast wrong code is still wrong.
Outcome expectations
- Performance claims are backed by reproducible measurements.
- Profile data points clearly to one or few prioritized hotspots.
- Fixes are incremental and attributable (one change, one measurement delta).
- Correctness and behavior remain unchanged after optimization.
Workflow
Make the problem measurable
- Define the symptom: latency, throughput, CPU, heap, alloc count, lock wait, or tail latency.
- Add a benchmark or a reproducible workload before touching the implementation.
Capture evidence
- CPU profile for time spent
- Allocation / heap profile for churn and retention
- Contention evidence for locks, channels, or task scheduling
Analyze the bottleneck
- Confirm whether the problem is algorithmic, allocation-heavy, cache-unfriendly, or synchronization-heavy.
- Inspect the hottest call paths before proposing fixes.
Apply targeted fixes
- Pre-allocate, reuse buffers, remove needless clones, tighten data layout, or reduce synchronization.
- Add parallelism only when the workload is large enough and coordination cost is justified.
Verify the result
- Re-run the same benchmark/profile
- Record the measurable improvement and ensure behavior is unchanged
Symptom to first tool mapping
- High CPU or low throughput -> Criterion + CPU profiler / flamegraph
- Memory growth or heap churn -> allocation/heap profiler (
dhat,heaptrack) - Latency spikes with shared state -> contention and lock analysis
- Async scheduling inefficiency -> runtime-aware tracing and task instrumentation
- CI performance regressions -> deterministic instruction-count benchmarking (
iai-callgrind) - Shipping a binary that is already profile-tuned and needs final codegen/build tuning -> build tuning (
compiler-and-build-tuning.md)
Resources
Load on demand:
references/measurement-workflow.md— use when defining benchmarks, baselines, and release settingsreferences/profiling.md— use when choosing CPU, heap, allocation, or contention profilersreferences/allocations-and-data-layout.md— use when the bottleneck smells like cloning, heap churn, or cache localityreferences/concurrency-and-throughput.md— use when evaluating Rayon, async throughput, locks, channels, backpressure,available_parallelism, or false sharingreferences/compiler-and-build-tuning.md— use when release-profile knobs are not enough, or when tuning-C target-cpu, PGO, BOLT, LLD,--timings, or nightly Cranelift / parallel frontend
Files in this version
references/518.3 KB
- allocations-and-data-layout.md4.0 KB
- compiler-and-build-tuning.md4.9 KB
- concurrency-and-throughput.md4.3 KB
- measurement-workflow.md3.3 KB
- profiling.md1.9 KB
- SKILL.md4.0 KB
Permissions
| Permission | Declared | Found by the scan |
|---|---|---|
| Reads files | No | No |
| Writes files | No | No |
| Runs shell commands | Yes | Yes |
| Uses the network | No | No |
| Uses connectors | No | No |
| Drives a browser | No | No |
Scan findings
Reviewed on Nov 13, 2026
The scan found nothing to flag in this version.
A clean scan lowers the risk but does not prove a package is safe. Read what you install.
| Version | Published | Commit | SHA-256 | Signature | Permission change |
|---|---|---|---|---|---|
| v2026.11.13-21cd568 | Nov 13, 2026 | 21cd568 | 818635e3 | Signed | – |
More from AeonDave
All from this publisherMore in Reverse engineering and fuzzing
See the categoryAsk anything your scope allows.
Create an account, add credits and ask the first question in the chat or the terminal.
- 1/3
Create the account
Individual or company. You can switch to a company later without losing balance or keys.
IndividualCompany - 2/3
Add credits
By card. Pay per token, no subscription.
$5.00minimum deposit - 3/3
Ask
In the chat, or install the CLI and run notholy login in your terminal.
$ notholy login