Samply
vortex-data/vortex
Analyze Samply Firefox-profiler output, record focused profiles, summarize hot threads/stacks, inspect symbolication, and compare profile evidence before and after a performance change.
Rust performance optimization patterns: batch operations, allocation hierarchy, object pooling, CodeTransform API for vertercompiler
$ npx skills add pikax/verter --skill rust-performance -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install pikax/verter rust-performance --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/pikax/verter.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/rust-performance .claude/skills/rust-performance && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "rust-performance" agent skill from https://github.com/pikax/verter/tree/main/.claude/skills/rust-performance into .claude/skills/rust-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-performance", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/pikax/verter/tree/main/.claude/skills/rust-performanceType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add pikax/verter --skill rust-performance -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install pikax/verter rust-performance --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pikax/verter.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/rust-performance .agents/skills/rust-performance && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "rust-performance" agent skill from https://github.com/pikax/verter/tree/main/.claude/skills/rust-performance into .agents/skills/rust-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-performance", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add pikax/verter --skill rust-performance -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install pikax/verter rust-performance --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pikax/verter.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/rust-performance .cursor/skills/rust-performance && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "rust-performance" agent skill from https://github.com/pikax/verter/tree/main/.claude/skills/rust-performance into .cursor/skills/rust-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-performance", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/pikax/verter.git --path .claude/skills/rust-performance--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add pikax/verter --skill rust-performance -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install pikax/verter rust-performance --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pikax/verter.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/rust-performance .gemini/skills/rust-performance && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "rust-performance" agent skill from https://github.com/pikax/verter/tree/main/.claude/skills/rust-performance into .gemini/skills/rust-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-performance", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install pikax/verter rust-performanceInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add pikax/verter --skill rust-performance -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/pikax/verter.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/rust-performance .github/skills/rust-performance && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "rust-performance" agent skill from https://github.com/pikax/verter/tree/main/.claude/skills/rust-performance into .github/skills/rust-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-performance", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add pikax/verter --skill rust-performance -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install pikax/verter rust-performance --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/pikax/verter.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/rust-performance .opencode/skills/rust-performance && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "rust-performance" agent skill from https://github.com/pikax/verter/tree/main/.claude/skills/rust-performance into .opencode/skills/rust-performance/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "rust-performance", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
rust-performanceRust performance optimization patterns: batch operations, allocation hierarchy, object pooling, CodeTransform API for vertercompiler
Rust Performance is an agent skill from pikax/verter. Rust performance optimization patterns: batch operations, allocation hierarchy, object pooling, CodeTransform API for vertercompiler
Its SKILL.md is about 2.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Development, covering Performance optimization. It works with Rust. The repository describes itself as: Fast Rust-powered compiler, semantic extraction, and LSP for component frameworks. The licence is MIT.
11 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 98aba28. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
pnpmFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use pnpm, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Rust Performance loads about 2.8k tokens when it runs. Until then it costs about 38 tokens; SKILL.md has 981 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from pikax/verter at commit 98aba28, republished under its MIT licence (© pikax). 981 words, ~2,797 tokens.
.claude/skills/rust-performance/SKILL.md (or your agent's skills folder).Principles for writing performant Rust in verter_compiler.
CodeTransform operations like overwrite() and prepend_left() each walk the chunk list in O(n). Calling them in a loop is O(n*N). Collect operations into Vecs and apply with batch APIs:
batch_overwrite(ops: &[(u32, u32, &str)]) — sorted overwrites in one chunk-list passbatch_prepend_left_static(ops: &[(u32, &str)]) — sorted inserts in one pass// BAD: O(n) per call × N calls
for (start, end, content) in replacements {
code_transform.overwrite(start, end, content);
}
// GOOD: O(n+m) single pass
replacements.sort_by_key(|(start, _, _)| *start);
code_transform.batch_overwrite(&replacements);If calling a mutating method in a loop, ask whether operations can be collected and applied in one traversal.
Prefer allocations in this order (fastest to slowest):
&'static str — zero-cost, compile-time constants&'alloc str via code_transform.alloc_str(buf) — OXC bump allocator, freed in bulk&str from ctx.input[start..end] — zero-cost slice of source&mut String buffer — amortized cost via capacity reuseString — heap-allocated, avoid in hot paths| Need | Use |
|---|---|
| Known constant value | &'static str |
| Generated text that outlives current function | code_transform.alloc_str(buf) → &'alloc str |
| Substring of source input | &ctx.input[start..end] |
| Temporary text build-up | Shared &mut String buffer (see below) |
| Truly owned, long-lived, mutable text | String |
Codegen generators (e.g., VdomTemplateGenerator) keep a buf: String field. Use std::mem::take to temporarily take ownership — avoids borrow conflicts with other self fields:
// Take buffer — avoids per-element heap allocation:
let mut buf = std::mem::take(&mut self.buf);
process_element(&mut buf, ...);
self.buf = buf; // return — retains capacity for next element
// In called functions, accept buf: &mut String.
// Use `buf` directly, not `&mut buf` (it's already &mut String).After building text in buf, persist via bump allocator:
buf.clear();
buf.push_str("_createVNode(");
buf.push_str(tag);
buf.push(')');
let s: &'alloc str = code_transform.alloc_str(&buf);
pending_overwrites.push((start, end, s));To build a temporary string inside a function already using buf, use save/truncate instead of allocating a second buffer:
let saved = buf.len();
buf.push_str("{ ");
for (i, prop) in props.iter().enumerate() {
if i > 0 { buf.push_str(", "); }
buf.push_str(prop);
}
buf.push_str(" }");
let result = code_transform.alloc_str(&buf[saved..]);
buf.truncate(saved); // restore buf to previous stateAvoids per-element heap allocation when building intermediate strings like hoisted props.
StateStack (per-element state during tree walk) contains multiple Vec fields. Pool instead of allocating/dropping per element:
// Take from pool — Vecs retain capacity from previous use:
fn take_state(&mut self, id: u32) -> StateStack {
if let Some(mut s) = self.state_pool.pop() {
s.reset(id); // .clear() on all Vecs — retains capacity
s
} else {
StateStack { id, ..Default::default() }
}
}
// Return to pool after element close:
fn return_state(&mut self, state: StateStack) {
self.state_pool.push(state);
}Apply to any struct with inner collections repeatedly created/dropped in a loop. Vec::clear() retains allocated capacity.
ctx.input holds the full source text. Borrow slices directly instead of cloning:
// BAD: heap allocation just to read
let name: String = ctx.input[start..end].to_string();
buf.push_str(&name);
// GOOD: zero-cost borrow
let name: &str = &ctx.input[start as usize..end as usize];
buf.push_str(name);For struct fields, prefer &'alloc str (bump-allocated) when the struct's lifetime allows. If adding a lifetime would cascade through too many types, String is acceptable.
For functions frequently returning one of a small set of constants, return &'static str directly. &'static str coerces to &'alloc str, so static constants can be used anywhere bump-allocated strings are expected.
// Common close strings — no bump allocation needed
let close_str: &'alloc str = if patch_flag.0 == 0 && !is_block_root {
if needs_array { "])" } else { ")" } // &'static str coerces to &'alloc str
} else {
// Rare case: build dynamically
buf.clear();
write_patch_flag_suffix(buf, patch_flag, &dynamic_props);
code_transform.alloc_str(buf)
};Use with_capacity when expected size is known or estimable:
pending_overwrites: Vec::with_capacity(512),
pending_prepend_lefts: Vec::with_capacity(256),
buf: String::with_capacity(128),Over-estimating slightly is cheaper than re-allocating.
Once allocation and batching are optimized, further gains come from doing less work:
resolved_components_set for component dedupWhen processing strings character-by-character (e.g., escaping), prefer a bulk-copy pattern that tracks unmodified regions and copies them in one push_str call:
fn escape_js_string_into(buf: &mut String, s: &str) {
let mut last_copy_end = 0;
for (i, ch) in s.char_indices() {
let replacement = match ch {
'"' => "\\\"",
'\\' => "\\\\",
'\n' => "\\n",
_ => continue,
};
buf.push_str(&s[last_copy_end..i]); // bulk copy unmodified region
buf.push_str(replacement);
last_copy_end = i + ch.len_utf8();
}
buf.push_str(&s[last_copy_end..]); // copy remaining
}When comparing against another compiler (e.g., Vue's @vue/compiler-sfc):
pnpm run profile:hotpath:mcp # Start with MCP endpoint at http://localhost:6771/mcp
pnpm run profile:hotpath # Timing hotspots (no MCP)
pnpm run profile:hotpath:alloc # Timing + allocation hotspotsAgent MCP config template: mcp/hotpath.mcp.json
A. Fast-path overwrite() for single Original chunk — When the overwritten range falls within a single Original chunk, bypass the general SmallVec<[Chunk; 4]> + Vec::splice path. Use direct Vec::insert (1-2 calls) for the 4 sub-cases.
B. Eliminate build_string first pass via output_delta tracking — Added output_delta: i64 field tracking running difference between inserted and removed content. build_string() uses it for String::with_capacity, eliminating the first chunk-iteration pass. ~19% improvement on build_string/2000.
C. Merge move_wrapped split + identification into single pass — Replaced 3 separate linear scans with a single forward while loop.
E-H. Scratch Vec pre-allocation, push_u32 direct digit computation, format_patch_flag static strings, provided_locals Option optimization — Combined: compile aggregate -9.4%.
K-N. format_scope_close → &'static str, children.rs text run static constants, condition_scope_close, build_child_records prefix optimization — Combined: no_sourcemap -5.0%, with_sourcemap -8% to -17%.
D. PositionSweep for monotonic positions — Changing emit_mapped_content's function signature caused +8.7% regression on unmodified files. Binary search with ~10 comparisons is already in the CPU branch predictor's sweet spot.
I. BindingContext clone elimination — Inconclusive due to 20-33% system noise. BindingContext clone cost is small (one FxHashSet per expression).
O. Vec<ChildRecord> reuse via std::mem::take — No measurable improvement. Small Vec allocations (1-10 items) are already efficient.
| Area | Why it won't help |
|---|---|
offset_to_line_col binary search | Already fast for typical file sizes |
emit_mapped_content signature | Changing parameters causes LLVM optimization regressions |
memchr_iter in source map | Already optimal — memchr uses SIMD |
Vec<ChildRecord> reuse | Small Vec allocations (1-10 items) are already fast |
resolve_simple_expr per-expression String | ~10-20 calls per component, ~20 bytes each — below noise floor |
| Component resolution String allocation | Per-component, unavoidable (tag names are dynamic) |
| Pattern | Problem | Fix |
|---|---|---|
overwrite()/prepend_left() in a loop | O(n) per call | Collect into Vec + batch API |
buf.clone() for storage | Heap alloc per clone | code_transform.alloc_str(buf) |
.to_string() on ctx.input slices | Unnecessary heap copy | &ctx.input[start..end] |
| Fresh Vec-heavy structs per iteration | Alloc/dealloc churn | Pool + reset() with .clear() |
Instant::now() unconditionally | Panics in WASM | #[cfg(not(target_arch = "wasm32"))] guard |
| SmallVec with large types (>64B) in Box'd structs | Inflates allocation size, 40-50% regression | Keep Vec |
Vec<String> for bump-allocatable content | Per-element heap alloc | Vec<&'alloc str> + save/truncate |
Explicit is_sorted check before sort | Rust's TimSort already detects sorted runs | Just call .sort_by_key() |
| Changing hot function signatures | Causes LLVM optimization regressions | Keep hot function signatures stable |
| Linear sweep replacing binary search on <1K elements | Binary search already in CPU branch predictor sweet spot | Only consider at >10K elements |
| Reusing small Vecs (1-10 items) | Allocator handles small allocations efficiently | Only pool/reuse Vecs with >50 items |
© pikax, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/rust-performance of pikax/verter.
Open the folder on GitHubat commit 98aba28
Rust Performance next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Rust Performance this skillpikax/verter | 112 | — | ~2.8k | Automated safety check: Pass | MIT | |
| Samplyvortex-data/vortex | 3.2k | — | ~2.7k | Automated safety check: Pass | Apache-2.0 | |
| Investigate User Bugcristicretu/diri | 424 | — | ~1.2k | Automated safety check: Pass | Apache-2.0 | |
| Cppcrazyguitar/cppcheatsheet | 290 | — | ~1.8k | Automated safety check: Pass | MIT | |
| Rust Profilingdiodeme/Gold-Band | 143 | 1 repos | ~1.7k | Automated safety check: Notes | AGPL-3.0 | |
| ProfilingShopify/rubydex | 363 | — | ~2.3k | Automated safety check: Notes | Custom licence |
vortex-data/vortex
Analyze Samply Firefox-profiler output, record focused profiles, summarize hot threads/stacks, inspect symbolication, and compare profile evidence before and after a performance change.
cristicretu/diri
Investigate a bug a specific diri user hit (crash, hang, slowness, memory leak, blank or garbled terminal, spawn/resume/remote failure, copy/paste not working) from diri's telemetry with the…
crazyguitar/cppcheatsheet
Comprehensive C/C++ programming reference covering everything from C11-C23 and C++11-C++23, system programming, CUDA GPU computing, debugging tools, Rust interop, and advanced topics.
diodeme/Gold-Band
Rust profiling skill for performance analysis. An agent skill from diodeme/Gold-Band.
Shopify/rubydex
Profile Rubydex indexer performance — CPU flamegraphs, memory usage, phase-level timing.
oxc-project/oxc
Review guidance for the speed of Oxc linter rules written in Rust: narrow node-kind checks, cheap tests first, deferred diagnostics and the smallest possible iteration.
pikax/verter
In-process backtrace watchdog + LLDB attach wrapper + release-dbg profile for diagnosing hangs and slow paths in Verter benches and binaries on Windows / macOS / Linux.
pikax/verter
Generate copy-pasteable prompts for driving separate Claude Code sessions through refactor, review, or migration work.
pikax/verter
Build dependency chains, rebuild sequences, profiling with MCP, and Analysis MCP server setup for Verter
pikax/verter
Rust compiler pipeline, template codegen (VDOM/IDE), CodeTransform, cached directives, strict slots, IDE error recovery, style preprocessing, CompileTarget, compiler authority/policy/demand/admission
pikax/verter
CTO/manager-of-managers methodology for autonomous multi-train plans where the user says "you are the MoM/CTO", "orchestrate the whole plan", "drive the migration end-to-end", "manager-of-managers"…
pikax/verter
Verter semantic signature kernel — signature records/descriptors, epoch-safe interned storage and retirement, request-pinned borrowed reads, positional matching, call substitution, ordered…
Works with
Categories
Rust performance optimization patterns: batch operations, allocation hierarchy, object pooling, CodeTransform API for vertercompiler. Rust Performance is an agent skill from pikax/verter.
Rust Performance fits situations like: tasks that involve Performance optimization.
Run `npx skills add pikax/verter --skill rust-performance -a claude-code`. Or copy the skill folder (.claude/skills/rust-performance in pikax/verter) into .claude/skills/rust-performance in your project. Claude Code loads it when a task matches its description.
Run `npx skills add pikax/verter --skill rust-performance -a codex`. Or copy the skill folder (.claude/skills/rust-performance in pikax/verter) into .agents/skills/rust-performance in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add pikax/verter --skill rust-performance -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/rust-performance, .gemini/skills/rust-performance, .github/skills/rust-performance and .opencode/skills/rust-performance in your project.
Going by SKILL.md and its folder, Rust Performance needs the command-line tools its instructions call (pnpm).
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Rust Performance is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.8k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Rust Performance: Samply (vortex-data/vortex, 3.2k stars), Investigate User Bug (cristicretu/diri, 424 stars), Cpp (crazyguitar/cppcheatsheet, 290 stars) and Rust Profiling (diodeme/Gold-Band, 143 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
pikax (a GitHub user) maintains it in pikax/verter, which has 112 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 7, 2026.
Source: pikax/verter on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.