XPerf
语言Go

goperf-lint

这篇还没有中文,下面是英文原文。

Heuristic Go checker for gp-make-hot–gp-defer-hot. Line/brace window scanner — not a full SSA pass.

IDSmell
gp-make-hotmake/new in loop; reuse buffers when profiles show pressure
gp-string-plus-hotstring += in loop; prefer strings.Builder
gp-fmt-hotfmt.Sprintf/Printf in loop; gate or use cheaper writers
gp-append-nil-sliceempty slice grown with append in size-hinted loop; prefer make([]T, 0, n)
gp-defer-hotdefer in loop; calls accumulate until function returns

Defaults: gp-make-hot–gp-fmt-hot off (G3 OK-idiom demotion), gp-append-nil-slice/gp-defer-hot hint. Enable demoted rules with --severity gp-make-hot=hint. Self-dogfood: bash ../scripts/self-lint.sh must stay clean on cmd/ + internal/ (fixtures excluded via fixtures/ skip).