# Performance Proof

> Prove a performance improvement before and after changing algorithms, data structures, latency, throughput, memory, bundle size, build time, or repeated work. Use when a concrete path is slow or resource-heavy, when considering Map, Set, heap, trie, queue, cache, index, batching, or memoization, or when asked to optimize code without guessing.

- **Type:** Skill
- **Install:** `agentstack add skill-railly-skills-performance-proof`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Railly](https://agentstack.voostack.com/s/railly)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [Railly](https://github.com/Railly)
- **Source:** https://github.com/Railly/skills/tree/main/skills/.experimental/performance-proof

## Install

```sh
agentstack add skill-railly-skills-performance-proof
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Performance proof

The best algorithm depends on workload, constraints, data distribution, and required semantics. Optimize only a measured path.

## 1. Define the claim

State the user-visible performance property, representative workloads, realistic size distribution, worst credible case, required tail or memory bounds, correctness constraints, and stop condition.

**Complete when:** success and rejection can be decided from measurements.

## 2. Record a stable baseline

Capture environment, build mode, dataset, warmup, repetitions, variance, and raw results. Confirm the harness exercises the claimed path. If noise is larger than the expected effect, improve the harness before editing.

**Complete when:** repeated baseline runs are comparable and the workload is representative.

## 3. Profile the path

Use the repository's profiler, tracing, allocation, query-plan, bundle, or timing tools. Name the hot function, allocation, I/O wait, or repeated computation. State expected time and space complexity for the measured region.

**Complete when:** evidence identifies the cost center. If it does not, stop without an optimization claim.

## 4. Compare candidates

Evaluate the smallest candidates that preserve semantics:

| Hot pattern | Candidate | Required check |
|---|---|---|
| repeated search in a hot loop | `Map` index | uniqueness, ordering, build cost, memory |
| repeated membership checks | `Set` | equality, order, construction crossover |
| full sort for small top K | bounded heap or selection | ties, stability, realistic K/N |
| front removal in high-volume FIFO | deque or ring buffer | bounds, backpressure, reuse |
| repeated prefix lookup | trie or prefix index | normalization, update cost, memory |
| repeated graph scan | adjacency or reverse index | invalidation and stale state |
| linear route lookup | exact index plus explicit fallback | precedence and canonicalization |

Include the current implementation as a candidate. Prefer the simpler implementation when results are within noise.

**Complete when:** the chosen candidate has a complexity hypothesis and explicit semantic risks.

## 5. Implement one bounded change

Proceed only when source edits are authorized. Preserve unrelated work. Add semantic equivalence coverage before or with the change.

**Complete when:** one attributable change implements the measured hypothesis.

## 6. Re-measure and reject honestly

Run correctness checks and the same benchmark. Compare distributions, not one favorable run. Check required tail latency, throughput, memory, build or bundle size, and operational complexity.

Reject when the difference is within noise, the workload is unrepresentative, a required metric regresses, semantics change, or complexity grows without material value.

**Complete when:** the claim is proven, rejected, or explicitly inconclusive with raw evidence.

## 7. Guard and review

Add the smallest durable benchmark, budget, or regression test with a documented noise policy. Run the repository review gate when available.

**Complete when:** future regressions can be detected and the rollback path is named.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Railly](https://github.com/Railly)
- **Source:** [Railly/skills](https://github.com/Railly/skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-railly-skills-performance-proof
- Seller: https://agentstack.voostack.com/s/railly
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
