benchmark-optimization-loop

Optimize PHP and Laravel performance through measured, correctness-preserving benchmark iterations.

Updated Jan 6, 2023
One-click install
npx skills add https://github.com/pekral/phpstan-rules --skill benchmark-optimization-loop-pekral
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: benchmark-optimization-loop
Source: https://github.com/pekral/phpstan-rules/tree/main/.claude/skills/benchmark-optimization-loop
Command: npx skills add https://github.com/pekral/phpstan-rules --skill benchmark-optimization-loop-pekral

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill solves the problem of vague, unquantified performance goals by replacing guesswork with a rigorous, data-driven optimization loop that ensures every change is a verified, correctness-preserving improvement.

Core Features & Use Cases

  • Measured Optimization: Enforces a strict baseline-and-variance methodology to distinguish real performance gains from statistical noise.
  • Correctness Gate: Ensures that speed improvements never compromise application logic by requiring full test suite validation for every iteration.
  • Use Case: Use this when you need to reduce p95 latency or query counts in a Laravel application, ensuring that your changes are backed by reproducible benchmarks rather than intuition.

Quick Start

Initiate the benchmark optimization loop by defining your baseline operation, correctness gate, and performance metric before applying any code changes.

Frequently Asked Questions about benchmark-optimization-loop

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

FAQPage Schema
What is a measured optimization loop for PHP performance tuning?

A measured optimization loop is a structured, recursive framework for backend performance tuning that replaces guesswork with strict baseline recording and variance analysis to verify actual latency reduction in PHP environments.

How do I reduce p95 latency in a Laravel application without breaking existing logic?

To reduce p95 latency in Laravel safely, apply a recursive optimization loop that requires full automated test suite validation as a correctness gate before applying any code changes, ensuring speed improvements never compromise application logic.

How do I start the benchmark optimization process for query optimization?

Initiate the benchmark optimization process by defining your baseline operation, establishing a correctness gate, and specifying your performance metric before applying any code changes to ensure reproducible benchmarks.

Does this performance tuning approach work for general PHP applications or only Laravel?

This optimization loop applies to backend performance tuning and query optimization in both general PHP and Laravel environments, requiring strict adherence to baseline recording and automated testing to validate performance wins.

What's the best way to distinguish real performance gains from statistical noise?

The best way to distinguish real performance gains from statistical noise is using a baseline-and-variance methodology that enforces measured, reproducible benchmarks rather than relying on intuition during the optimization process.

When should I not use an iterative benchmarking approach for latency reduction?

You should not use an iterative benchmarking approach if you cannot establish a strict baseline operation or lack an automated test suite to act as a correctness gate, as unquantified changes risk introducing statistical noise.