Tag

slice allocation

1 views collected around this technical thread.

360 Tech Engineering
360 Tech Engineering
Jan 14, 2020 · Backend Development

Go Performance Optimization Techniques: sync.Pool, Map Key Choices, Code Generation, strings.Builder, strconv, and Slice Allocation

This article presents a collection of practical Go performance‑tuning techniques—including reuse of objects with sync.Pool, avoiding pointer‑heavy map keys, generating marshal code to bypass reflection, using strings.Builder for efficient concatenation, preferring strconv over fmt, and pre‑allocating slices—to significantly reduce allocation overhead and garbage‑collection time.

Gomap optimizationperformance
0 likes · 13 min read
Go Performance Optimization Techniques: sync.Pool, Map Key Choices, Code Generation, strings.Builder, strconv, and Slice Allocation