/Go

The One Billion Row Challenge In Go: From 1m 45s To 4s In Nine Solutions

- Ben Hoyt tl;dr: “This article describes the nine solutions I wrote in Go, each faster than the previous. The first, a simple and idiomatic solution, runs in 1 minute 45 seconds on my machine, while the last one runs in about 4 seconds. As I go, I’ll show how I used Go’s profiler to see where the time was being spent.”

featured in #494


Making A Go Program 42% Faster With A One Character Change

- Harry Marr tl;dr: "If you read the title and thought “well, you were probably just doing something silly beforehand”, you’re right! But what is programming if not an exercise in making silly mistakes? Tracking down silly mistakes is where all the fun is to be had! I’ll also state the usual benchmarking caveat up front: the 42% speedup was measured while running the program on my data on my computer, so take that number with a big old pinch of salt."

featured in #369


Go Runtime: 4 Years Later

- Michael Knyszek tl;dr: Go runtime has been steadily improving: (1) sync.Pool, a GC-aware tool for reusing memory, has a lower latency impact and recycles memory much more effectively than before. (2) The Go runtime returns unneeded memory back to the operating system much more proactively. (3) The Go runtime is able to preempt goroutines more readily in many cases, reducing stop-the-world latencies up to 90%. And more. 

featured in #355


Rob Pike’s Simple C Regex Matcher In Go

- Ben Hoyt tl;dr: "Back in 1998, Rob Pike – of Go and Plan 9 fame – wrote a simple regular expression matcher in C for The Practice of Programming... With Go’s C heritage, and Pike’s influence on the Go language, I thought I’d see how well the C code would translate to Go, and whether it was still elegant.

featured in #343


Go Proverbs

- Rob Pike tl;dr: (1) Don't communicate by sharing memory, share memory by communicating. (2) Concurrency is not parallelism. (3) Channels orchestrate; mutexes serialize. (4) The bigger the interface, the weaker the abstraction. (5) Make the zero value useful. And more. 

featured in #333


We Already Have Go 2

tl;dr: The first version of Go has evolved significantly: The compiler rewrite in Go, modules, context package and Generics. "Releasing 'Go 2' has become a philosophical and political challenge due to the forces that be... This is a look back at the huge progress that has been made since Go 1 released and what I'd consider to be the headline features of Go 2."

featured in #320


Generics Can Make Your Go Code Slower

- Vicent Marti tl;dr: "This blog post does not take sides in that debate, or advise where and when to use Generics in Go. Instead, this blog post is about the third side of the generics conundrum: It’s about systems engineers who are not excited about generics per se, but about monomorphization and its performance implications."

featured in #304


An Introduction To Generics

- Ian Lance Taylor Robert Griesemer tl;dr: Generics adds 3 new things to Go: (1) Type parameters for function and types. (2) Defining interface types as sets of types, including types that don’t have methods. (3) Type inference, which permits omitting type arguments in many cases when calling a function.

featured in #302


Go 1.18 Is Released!

tl;dr: "Go 1.18 is a massive release that includes new features, performance improvements, and our biggest change ever to the language." New additions include (1) Generics. (2) Fuzzing. (3) Workspaces. (4) 20% performance improvements.

featured in #300


Three Minor Features In Go 1.18

- Carl Johnson tl;dr: (1) Version control information included in the binary. (2) New http.MaxBytesHandler middleware (3) Unreasonably effective strings.Cut function.

featured in #279