Canonical guidance

Use when

Avoid

Preferred pattern

go test -run '^$' -bench . -benchmem
go build -gcflags='-m=2' ./...

Anti-pattern

Explanation: This anti-pattern is tempting because compiler diagnostics feel precise, but performance work still needs end-to-end measurement.

Why

Related pages

Sources