| schema_version | 1 | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| name | code-performance-reviewer | ||||||||||||||
| description | Use when reviewing Rust code for micro-optimizations and performance — hot-path audits, allocation/cache footprint review, API design for speed, Criterion-backed regressions, or flat profiles with no obvious hotspot. Inspired by Abseil Performance Hints (Jeff Dean & Sanjay Ghemawat). Pair with rust-backend-engineer (standards), code-review (general audit method), rust-criterion-benchmarking, and rust-concurrency-patterns. | ||||||||||||||
| tags |
|
||||||||||||||
| triggers |
|
Your best ideas are scattered across a dozen places right now. Notes apps. Browser tabs. Old chats with Claude that you closed and will never find again. Every time you sit down to work, you rebuild context from memory, and you forget most of it.
A second brain fixes that. It is one place that holds everything you know, with Claude sitting on top of it, reading it, connecting it, and growing it for you. You stop re-explaining yourself every session, because the system already remembers. Ask it anything you have ever written down and it answers from the whole thing.
This is the idea Andrej Karpathy popularized in April 2026 with his LLM Wiki pattern. The setup takes an evening, and unlike a chat history that rots, this one gets sharper every single day you use it.
Below is the full walkthrough, written so you can follow it even if you have never opened Claude Code or MentisDB before. Every step spells out ex
Extracted from Gubafit's Fitness Archive 43 workouts designed by Eduardo Duque Date range: February 07, 2014 → March 06, 2015
Most agent memory systems fail in the same boring way.
They store something. Then the agent reconnects later and does not know the memory exists, does not know when to use it, or retrieves the wrong thing at the wrong time.
So the human repeats the context. Again.
| use std::collections::HashMap; | |
| use std::env; | |
| use std::fs; | |
| #[derive(Debug)] | |
| enum Formula { | |
| Atom(char), | |
| Not(Box<Formula>), | |
| And(Box<Formula>, Box<Formula>), | |
| } |
| MBP14inchDec2024:cloudllm gubatron$ cargo run --example tetris_planner_team | |
| Compiling cloudllm v0.10.6 (/Users/gubatron/workspace/cloudllm) | |
| Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.35s | |
| Running `target/debug/examples/tetris_planner_team` | |
| ╔════════════════════════════════════════════════════════════════╗ | |
| ║ TETRIS BUILDER — RALPH Orchestration Demo ║ | |
| ║ Claude Sonnet 4.6 Agent Team ║ | |
| ╚════════════════════════════════════════════════════════════════╝ |
| [Title]: <concise, action-oriented title> | |
| Component(s): <e.g., crates/transport/src/engine.rs, src/storage/cache.rs, src/protocol/codec.rs> | |
| Severity: <critical|high|medium|low> | |
| Category: <CPU|Allocation|I/O|Concurrency|Networking|Async|Data-Structures|Syscall|Build|Safety> | |
| Labels: perf, <more>, linux|windows|macos|cross | |
| Problem | |
| <What’s slow/fragile; where it occurs; why it matters (e.g., pointer indirection, branch misprediction, async overhead)> | |
| Evidence/Heuristics: | |
| <Cite files/lines, types, stack traces, flamegraphs (cargo-flamegraph), or smells (e.g., excessive cloning, large futures)> |
Powered by cloudllm 0.4.0
Setting up council agents...
Council configured with 5 agents
Question:
Top 5
- Cache POSIX file handles inside
posix_storage::read/writeto avoid reopening on every block and collapse syscall churn on Linux/macOS builds. - Replace
disk_buffer_pool’s per-buffermalloc+ global mutex with an actual freelist/slab allocator to cut allocator latency and cross-thread contention. - Make
piece_picker::pick_pieces’ ignored-piece bookkeeping O(1) to remove quadratic scans in large swarms. - Back
peer_connection’s request queue with a queue/deque structure so front removals stop mem-moving full vectors on every send. - Drop the hot
socket.available()ioctl insidepeer_connection::on_receive_dataand rely on buffered reads to avoid extra syscalls.
[Title]: Cache file handles in posix_storage to eliminate per-block fopen/fclose Component(s): src/posix_storage.cpp, src/storage_utils.cpp, include/libtorrent/aux_/posix_storage.hpp
