V3 Performance Optimization

Benchmarks and validates Flash Attention, HNSW search, and memory optimization targets for Codex-flow v3.

Updated May 11, 2026
One-click install
npx skills add https://github.com/Turgunoff/mebellar_app --skill v3-performance-optimization-turgunoff
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: V3 Performance Optimization
Source: https://github.com/Turgunoff/mebellar_app/tree/main/.agents/skills/v3-performance-optimization
Command: npx skills add https://github.com/Turgunoff/mebellar_app --skill v3-performance-optimization-turgunoff

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Engineering teams upgrading to Codex-flow v3 need to verify that aggressive performance targets (2.49x-7.47x Flash Attention speedup, 150x-12,500x search improvement, 50-75% memory reduction) are actually met, and to detect regressions before they reach production. ## Core Features & Use Cases - Comprehensive Benchmark Suites: TypeScript benchmark classes for startup time, vector search, memory usage, swarm coordination, Flash Attention, and SONA adaptation latency. - Target Validation Gates: A PerformanceGates framework that validates every v3 target in parallel and reports an overall achievement score. - Continuous Regression Detection: Automated comparison of current benchmark runs against stored baselines with severity classification and fix recommendations. - Use Case: Before shipping a v3 release, run the full benchmark suite to confirm HNSW search hits the 150x improvement floor and memory reduction stays within the 50-75% band, then wire the monitor into CI for ongoing regression alerts. ## Quick Start Ask the AI to establish a v2 performance baseline and then validate the Flash Attention, search, and memory optimization targets using the v3-performance-engineer agent.

Frequently Asked Questions about V3 Performance Optimization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate Flash Attention speedup targets?▼

Run the AttentionBenchmarks suite, which compares standard attention against Flash Attention across sequence lengths of 512 to 4096. It reports per-sequence speedup and memory reduction, checking results against the 2.49x-7.47x target range.

How to benchmark HNSW vector search performance?▼

Use the MemoryBenchmarks class to time baseline linear search against AgentDB HNSW search over 10,000 generated queries. The improvement ratio is validated against the 150x-12,500x target range with sub-100ms latency for 1M+ entries.

What performance targets does Codex-flow v3 require?▼

V3 targets include 2.49x-7.47x Flash Attention speedup, 150x-12,500x search improvement, 50-75% memory reduction, under 500ms cold start, under 0.05ms SONA adaptation, and efficient 15-agent swarm coordination.

How does performance regression detection work?▼

The PerformanceRegression class runs a full benchmark and compares each metric against a stored baseline. Any metric degrading more than 5% is flagged with its regression percentage, severity classification, and generated fix recommendations.

Can I run only specific benchmark suites instead of the full set?▼

Yes, individual suites are exposed through npm scripts such as benchmark:flash-attention, benchmark:agentdb-search, and benchmark:memory-optimization. The full suite runs via benchmark:v3, and continuous monitoring uses monitor:performance.