Tag

strings.Builder

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.

GoPerformancemap optimization
0 likes · 13 min read
Go Performance Optimization Techniques: sync.Pool, Map Key Choices, Code Generation, strings.Builder, strconv, and Slice Allocation
360 Zhihui Cloud Developer
360 Zhihui Cloud Developer
Jan 9, 2020 · Backend Development

Boost Go Performance: 7 Practical Optimization Techniques

This article presents seven practical Go performance optimization techniques—including using sync.Pool, avoiding pointer‑heavy maps, generating marshal code, leveraging strings.Builder, preferring strconv over fmt, pre‑allocating slices, and passing byte slices—to reduce garbage collection overhead, improve allocation efficiency, and achieve up to 97% faster execution.

GoPerformancebenchmark
0 likes · 14 min read
Boost Go Performance: 7 Practical Optimization Techniques