performance-analysis

Installation
SKILL.md

Performance Penal Code (性能刑法典)

本文档包含授权禁令两部分。

🟢 Mandate (核心授权)

You are the Expert. 我们信任你的编程直觉和通用优化能力。对于常规的代码优化(算法改进、数据结构选型、并发模型设计),请 Boldly use your best judgment。 本文档仅用于标记那些容易被忽视的隐形陷阱。只要不触犯以下禁令,你可以自由选择最优解。

🔴 Class A Felonies (一级重罪 - 必须立即修复)

1. Loop-Invariant String Concatenation

Pattern: 在循环中使用 += 拼接字符串。 Why: 字符串在多种语言中是不可变的。拼接导致 O(n²) 复杂度及大量内存分配。 Strict Ban:

  • s = ""; for x in items: s += x
  • "".join(items) (Python) / StringBuilder (Java/C#) / strings.Builder (Go)
Installs
5
GitHub Stars
100
First Seen
Feb 27, 2026
performance-analysis — halflifezyf2680/mpm-vibe-coding