Skip to content

Instantly share code, notes, and snippets.

View Gonzih's full-sized avatar
🐁
⠊ ⠁⠍ ⠃⠕⠗⠑⠙ ⠕⠥⠼⠓ ⠕⠋ ⠍⠽ ⠍⠊⠝⠙

Maksim Soltan Gonzih

🐁
⠊ ⠁⠍ ⠃⠕⠗⠑⠙ ⠕⠥⠼⠓ ⠕⠋ ⠍⠽ ⠍⠊⠝⠙
View GitHub Profile
@CAFxX
CAFxX / golang_minimize_allocations.md
Last active March 20, 2026 19:54
Minimize allocations in Go

📂 Minimize allocations in Go

A collection of tips for when you need to minimize the number of allocations in your Go programs.

Use the go profiler to identify which parts of your program are responsible for most allocations.

Caution

Never apply these tricks blindly (i.e. without measuring the actual performance benefit/impact).

[!NOTE]