Go Hot-Path Auditor
A CI step that scans Go pull requests for unsafe bounds-check elimination opportunities and flags them with projected latency wins and safety warnings.
Backend platform teams maintaining Go compression, serialization, or networking libraries
- Static analysis over the AST that matches unsafe.Add + SliceData patterns the compiler cannot BCE
- Side-by-side diff of original vs. unsafe-equivalent assembly so reviewers can see the savings
- Per-call-site 'why this is safe' explanation tied to the original source proving the bound
- GitHub bot that comments on PRs with a wins table and a 'do not merge until proven' check
Compiler improvements make conventional BCE easier every release, so the unsafe escape hatch is reserved for genuinely hot paths; teams need a way to find those paths instead of guessing.
HN source post only reached 22 points/15 comments and the target audience (Go teams owning compression/serialization/networking libs) is a narrow niche; the referenced article (devdigest) shows the technique yields real wins (10.6% on brotli) but most readers can apply it via the built-in -gcflags=-d=ssa/check_bce/debug=1 flag themselves.Using unsafe to eliminate Go bound checks for 2x speedup ↗Eliminating Go bounds checks with unsafe | daily.dev ↗
No dedicated CI tool found that flags unsafe BCE opportunities with projected wins; only generic linters (golangci-lint, Staticcheck) and the built-in -gcflags diagnostic exist, leaving a genuine (if shallow) gap in the Go toolchain.Write Better Go Code: 20 Static Analysis Tools ↗goperf.dev - Go Optimization Guide ↗
Hard to charge for a single-purpose Go linter given free alternatives (golangci-lint has 100+ linters, Staticcheck is sponsor-supported); incumbents like Snyk/CodeQL bundle Go perf into broader SAST platforms that already have per-seat pricing for a budget this tool cannot match.GitHub - dominikh/go-tools: Staticcheck ↗Snyk AI Security Platform plans and pricing ↗
Risky — the article itself notes readers want a `//go:nobounds` pragma; the Go team adding such a pragma, or compiler improvements removing residual checks, would obsolete this tool as the 'why now' admits.Using unsafe to eliminate Go bound checks for 2x speedup ↗
Requires SSA-level analysis to identify residual bound checks, suggest unsafe rewrites, and model latency — non-trivial; the devdigest article walks through this requiring compiler internals knowledge and per-arch build constraints, raising implementation cost.Go Optimization Guide - GitHub ↗Profiling Tools Overview · Advanced Go Performance Engineering ↗