本文へスキップ
Skillpedia
一般的なプログラミング280k · #141

benchmark-optimization-loop

できること

プログラムや処理を計画的に高速化するためのツールです。既存の動作を壊さないように、さまざまなバージョンを試して最も効率的なものを見つけます。

使う場面

  • ✓何かをより速く動かしたいとき。
  • ✓多くの改善を同時に試したいとき。
  • ✓何かをより効率よく動かす最適な方法を見つけたいとき。

スキルのリンク

https://github.com/affaan-m/ECC/blob/main/pi/core/skills/benchmark-optimization-loop/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/affaan-m/ECC/blob/main/pi/core/skills/benchmark-optimization-loop/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“このコードを10倍速くしてみてください。ただし、正しく動作し続けるようにしてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

AIはまず現在のパフォーマンスを測定します。次に、小さな変更を一つずつ加えたいくつかのバージョンを作って試します。そして、すべての品質テストに合格した中で最も速いバージョンを選びます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Benchmark Optimization Loop

Use this skill to convert "make it 20x faster" or "try 50 recursive optimizations" into a bounded measured loop that can actually improve a system.

Required Baseline

Do not optimize until these exist:

  • the operation being optimized;
  • the correctness gate that must stay green;
  • the metric: wall time, p95 latency, rows/sec, cost/run, memory, error rate;
  • the current baseline;
  • the search budget: max variants, max time, max spend, max data impact.

If the user asks for an unrealistic target, keep the ambition but make the loop bounded and measurable.

Loop

  1. Measure the baseline.
  2. Identify bottlenecks from evidence.
  3. Generate variants that test one hypothesis each.
  4. Run variants with the same input shape.
  5. Reject variants that fail correctness, safety, or reproducibility.
  6. Promote the fastest safe variant.
  7. Codify the winning path in a script, command, test, config, or doc.
  8. Rerun the baseline and winner to confirm the delta.

Variant Table

Track variants like this:

Variant | Hypothesis | Command | Time | Correct? | Notes
baseline | current path | npm run job | 120s | yes | stable
batch-500 | fewer round trips | npm run job -- --batch 500 | 42s | yes | winner
parallel-8 | more workers | npm run job -- --workers 8 | 31s | no | rate limited

Recursive Search

For recursive or hyperparameter work:

  • persist every run to a ledger;
  • compare against the prior accepted winner, not only the previous run;
  • keep a holdout or replay check;
  • stop when improvement is within noise, correctness fails, cost exceeds the budget, or the search starts changing more variables than it can explain.

Use phrases like "best measured safe variant" instead of "global optimum" unless the search space was actually exhaustive.

Promotion Gate

A variant cannot become the new default until:

  • correctness tests pass;
  • the performance delta is repeated or explained;
  • rollback is obvious;
  • the change is encoded in source control or a durable runbook;
  • the final summary includes exact commands and measurements.
よくある質問

「ベースライン」とは何ですか?

最適化を試す前の、プログラムの初期のパフォーマンスのことです。

「正しさのチェック(correctness gate)」とは何ですか?

変更後も、プログラムが期待どおりに動作し続けることを確認するテストのことです。

AIはどのバージョンが最適かをどのように判断しますか?

試したバージョンごとに速度と正しさを比べ、正しく動作するもののうち最も速いものを採用します。

詳細

作者による元の説明

Convert 'make it faster' requests into a bounded measured optimization loop — baseline first, generate one-hypothesis variants, benchmark each against a correctness gate, and promote the fastest safe variant with reproducible commands. Use when asked to speed something up, try many variants, run recursive optimization, benchmark latency/throughput/cost, or pick the best implementation by repeated

repo: affaan-m/ECC

人気

GitHubのスター
280k
ランキング
#141
ライセンス
MIT
更新日
2026/10/15

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル