# Benchmark

> Run performance benchmarks, create baselines, and compare results

- Skill: `phel-lang/benchmark` (Agent Skill)
- Install (CLI): `npx skillmds@latest add phel-lang/benchmark`
- Raw SKILL.md: https://api.skillmd.com/api/skills/phel-lang/benchmark/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: phel-lang (https://skillmd.com/u/phel-lang)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/phel-lang/benchmark

---


# Benchmark Runner

## Context

!`git branch --show-current`
!`git log --oneline -1`

## Instructions

1. If `$ARGUMENTS` is empty or `run`:
   ```bash
   composer phpbench
   ```

2. If `$ARGUMENTS` is `baseline`:
   ```bash
   composer phpbench-base
   ```
   Report that future `/benchmark compare` will diff against this snapshot.

3. If `$ARGUMENTS` is `compare`:
   ```bash
   composer phpbench-ref
   ```
   Highlight any regressions (>5% slower) and improvements (>5% faster).

4. If `$ARGUMENTS` looks like a class or method filter:
   ```bash
   ./vendor/bin/phpbench run --filter="$ARGUMENTS" --report=aggregate --ansi
   ```

5. Report results focusing on:
   - Mean execution time and memory usage
   - Regressions vs improvements (when comparing)
   - Which benchmark classes were affected

