More efficient string interning
summary
Shows a concrete Go implementation change: replacing a naive sync.Map interner with a specialized two-part map (mutable recent map plus replaceable read-only map) that stores only one Go object per unique string. Benchmarks show 1 million strings -> 5 million objects with the naive approach and a 5x reduction to ~1 million Go objects after the change. Implementation ships in VictoriaMetrics, reduces GC overhead and yields more CPU for application work; recommendation is to adopt in Prometheus.
AI-written summary · about
related talks
19mHeap Optimization for Go Systems
48mGolang's Garbage
51mObscure Go Optimisations
14mMemory Optimization through Structure Packaging
40mProfiling real-world golang service
38mSo You Wanna Go Fast?
30mMemory Management in Go: The good, the bad and the ugly
21mUnderstanding Escape Analysis to Speed Up Your Code
