A Guide to Optimizing for High Performance in Go 🔨
A growing collection of technical articles designed to help Go developers build faster, more efficient applications. It starts by covering common patterns like object pooling, struct field alignment, and worker pools, with a high-performance networking guide coming soon.
Link to the article
#go #go@digest_golang #article #article@digest_golang
A growing collection of technical articles designed to help Go developers build faster, more efficient applications. It starts by covering common patterns like object pooling, struct field alignment, and worker pools, with a high-performance networking guide coming soon.
Link to the article
#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
Faster shuffling in Go with batching 🔨
Random integer generation is a fundamental operation in programming, often used in tasks like shuffling arrays. Go’s standard library provides convenient tools like rand.Shuffle for such purposes. You may be able to beat the standard library by a generous margin. Let us see why.
Link to the article
#go #go@digest_golang #article #article@digest_golang
Random integer generation is a fundamental operation in programming, often used in tasks like shuffling arrays. Go’s standard library provides convenient tools like rand.Shuffle for such purposes. You may be able to beat the standard library by a generous margin. Let us see why.
Link to the article
#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
More predictable benchmarking with testing.B.Loop ❤️
Go developers who have written benchmarks using the testing package might have encountered some of its various pitfalls. Go 1.24 introduces a new way to write benchmarks that’s just as easy to use, but at the same time far more robust: testing.B.Loop.
Link to the article
#go #go@digest_golang #article #article@digest_golang
Go developers who have written benchmarks using the testing package might have encountered some of its various pitfalls. Go 1.24 introduces a new way to write benchmarks that’s just as easy to use, but at the same time far more robust: testing.B.Loop.
Link to the article
#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
Using Signals With Go 📆
Signals are asynchronous messages delivered to processes to inform them of events such as interrupts, crashes, or termination, or to initiate specific actions. Most programming languages provide mechanisms to catch and handle signals — for example, to enable a program to shut down gracefully — and Go supports this as well.
Link to the article
#go #go@digest_golang #article #article@digest_golang
Signals are asynchronous messages delivered to processes to inform them of events such as interrupts, crashes, or termination, or to initiate specific actions. Most programming languages provide mechanisms to catch and handle signals — for example, to enable a program to shut down gracefully — and Go supports this as well.
Link to the article
#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
Where and why should you use iterators in Go? ❤️
In this article, I decided to dive in and figure out where iterators could actually be useful in practice. I read a bunch of articles, checked out developers’ feedback, asked around on Reddit — and in the end, I put together a list of cases where iterators can genuinely come in handy. I’ve already used a few of them in my own projects, and I’ve got to admit — it turned out to be pretty convenient.
Link to the article
#go #go@digest_golang #article #article@digest_golang
In this article, I decided to dive in and figure out where iterators could actually be useful in practice. I read a bunch of articles, checked out developers’ feedback, asked around on Reddit — and in the end, I put together a list of cases where iterators can genuinely come in handy. I’ve already used a few of them in my own projects, and I’ve got to admit — it turned out to be pretty convenient.
Link to the article
#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
Golang sync.Pool is not a silver bullet 📆
When it comes to performance optimization in Go, sync.Pool often appears as a tempting solution. It promises to reduce memory allocations and garbage collection pressure by reusing objects. But is it always the right choice? Let's dive deep into this fascinating topic.
Link to the article
#go #go@digest_golang #article #article@digest_golang
When it comes to performance optimization in Go, sync.Pool often appears as a tempting solution. It promises to reduce memory allocations and garbage collection pressure by reusing objects. But is it always the right choice? Let's dive deep into this fascinating topic.
Link to the article
#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
Cheating the Reaper in Go 📆
The article shows how to build a high-performance arena allocator in pure Go using unsafe, bypassing the garbage collector for manual memory control.
Link to the article
#go #go@digest_golang #article #article@digest_golang
The article shows how to build a high-performance arena allocator in pure Go using unsafe, bypassing the garbage collector for manual memory control.
Link to the article
#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
Optimizing Heap Allocations in Golang: A Case Study 📆
The article explains how a small change in Go code caused unexpected heap allocations and performance drops, highlighting the importance of understanding escape analysis.
Link to the article
#go #go@digest_golang #article #article@digest_golang
The article explains how a small change in Go code caused unexpected heap allocations and performance drops, highlighting the importance of understanding escape analysis.
Link to the article
#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
This 150-Line Go Script Is Actually a Full-On Load Balancer 🔨
A Simple HTTP Load Balancer in Go Using Standard Library, In this implementation, we'll use a round-robin algorithm to evenly distribute incoming requests among a collection of backend servers.
Link to the article
#go #go@digest_golang #article #article@digest_golang
A Simple HTTP Load Balancer in Go Using Standard Library, In this implementation, we'll use a round-robin algorithm to evenly distribute incoming requests among a collection of backend servers.
Link to the article
#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
SIGHUP Signal for Configuration Reloads ❤️
SIGHUP is a signal caught between two worlds. It was born from the physical "hang up" of terminal lines, and its original meaning — the loss of a controlling terminal — still applies.
Link to the article
#go #go@digest_golang #article #article@digest_golang
SIGHUP is a signal caught between two worlds. It was born from the physical "hang up" of terminal lines, and its original meaning — the loss of a controlling terminal — still applies.
Link to the article
#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM
Graceful Shutdown in Go: Practical Patterns 🔨
Graceful shutdowns can be the difference between a smooth user experience with reliable data and frustrated users (or yourself) dealing with data corruption. By following and adapting this five-step approach, you can shut down safely and avoid potential problems.
Link to the article
#go #go@digest_golang #article #article@digest_golang
Graceful shutdowns can be the difference between a smooth user experience with reliable data and frustrated users (or yourself) dealing with data corruption. By following and adapting this five-step approach, you can shut down safely and avoid potential problems.
Link to the article
#go #go@digest_golang #article #article@digest_golang
Please open Telegram to view this post
VIEW IN TELEGRAM