repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by bugabinga

prompts/optimize.md

Raw

description: Benchmark and optimize code argument-hint: ""

Benchmark and optimize code

Benchmark and optimize:

Target: $ARGUMENTS

Workflow:

  1. Profile - Use profiling to find hotspots and other performance problems
  2. Baseline - Create benchmark
  3. Analyze - Check code
  4. Optimize - Write efficient code
  5. Verify - Re-run benchmark, compare with benchstat
  6. Document - Comment optimization rationale
Markdown source
File outline
---
description: Benchmark and optimize code
argument-hint: "<function-or-file>"
---

# Benchmark and optimize code

Benchmark and optimize:

**Target**:
$ARGUMENTS

Workflow:

1. **Profile** - Use profiling to find hotspots and other performance problems
2. **Baseline** - Create benchmark
3. **Analyze** - Check code
4. **Optimize** - Write efficient code
5. **Verify** - Re-run benchmark, compare with benchstat
6. **Document** - Comment optimization rationale