Making A Go Program 42% Faster With A One Character Change
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
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
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
Generics Can Make Your Go Code Slower
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
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
Three Minor Features In Go 1.18
tl;dr: (1) Version control information included in the binary. (2) New http.MaxBytesHandler middleware (3) Unreasonably effective strings.Cut function.
featured in #279
Trying Out Generics In Go
tl;dr: "I think that generics will be very beneficial to maintainers who create libraries for things like... searching, sorting, transformations, and the like. I can also see some them being extremely helpful for creating well-tested libraries around the various concurrency patterns that are sometimes tricky to get right."
featured in #278