T

Golang “Set” Data Structure Example

https://www.alexkras.com/golang-set-example/

Golang does not have built it sets. Basic functionality can be mimicked using maps with empty...

T

Constant Time

https://dave.cheney.net/2019/06/10/constant-time

This essay is a derived from my dotGo 2019 presentation about my favourite feature in Go. Many...

T

How to dump the GOSSAFUNC graph for a method

https://dave.cheney.net/2020/06/19/how-to-dump-the-gossafunc-graph-for-a-method

The Go compiler’s SSA backend contains a facility to produce HTML debugging output of the...

T

Diamond interface composition in Go 1.14

https://dave.cheney.net/2020/05/24/diamond-interface-composition-in-go-1-14

Per the overlapping interfaces proposal, Go 1.14 now permits embedding of interfaces with...

T

Fatih’s question

https://dave.cheney.net/2020/05/16/fatihs-question

A few days ago Fatih posted this question on twitter. I’m going to attempt to give my answer,...

T

Ensmallening Go binaries by prohibiting comparisons

https://dave.cheney.net/2020/05/09/ensmallening-go-binaries-by-prohibiting-comparisons

Conventional wisdom dictates that the larger the number of types declared in a Go program, the...

T

Mid-stack inlining in Go

https://dave.cheney.net/2020/05/02/mid-stack-inlining-in-go

In the previous post I discussed how leaf inlining allows the Go compiler to reduce the overhead...

T

Inlining optimisations in Go

https://dave.cheney.net/2020/04/25/inlining-optimisations-in-go

This is a post about how the Go compiler implements inlining and how this optimisation affects...

T

go test -v streaming output

https://dave.cheney.net/2020/03/10/go-test-v-streaming-output

The testing package is one of my favourite packages in the Go standard library, not just because...

T

Are large slices more expensive than smaller ones?

https://dave.cheney.net/2020/03/01/are-large-slices-more-expensive-than-smaller-ones

Programmers have a tendency to be superstitious. Particularly, when a programmer hears that...

T

The Zen of Go

https://dave.cheney.net/2020/02/23/the-zen-of-go

This article was derived from my GopherCon Israel 2020 presentation. It’s also quite long. If...

T

Dynamically scoped variables in Go

https://dave.cheney.net/2019/12/08/dynamically-scoped-variables-in-go

This is a thought experiment in API design. It starts with the classic Go unit testing idiom:...

T

Use internal packages to reduce your public API surface

https://dave.cheney.net/2019/10/06/use-internal-packages-to-reduce-your-public-api-surface

In the beginning, before the go tool, before Go 1.0, the Go distribution stored the standard...

T

Be wary of functions which take several parameters of the same type

https://dave.cheney.net/2019/09/24/be-wary-of-functions-which-take-several-parameters-of-the-same-type

APIs should be easy to use and hard to misuse. — Josh Bloch A good example of a simple looking,...

T

Don’t force allocations on the callers of your API

https://dave.cheney.net/2019/09/05/dont-force-allocations-on-the-callers-of-your-api

This is a post about performance. Most of the time when worrying about the performance of a...

T

Go compiler intrinsics

https://dave.cheney.net/2019/08/20/go-compiler-intrinsics

Go allows authors to write functions in assembly if required. This is called a stub or forward...

T

Clear is better than clever

https://dave.cheney.net/2019/07/09/clear-is-better-than-clever

This article is based on my GopherCon Singapore 2019 presentation. In the presentation I...

T

Sydney High Performance Go workshop

https://dave.cheney.net/2019/07/05/sydney-high-performance-go-workshop

On the 17th of July I’ll be giving a version of my High Performance Go workshop updated for the...

T

How to check if a mutex is locked in Go

https://blog.trailofbits.com/2020/06/09/how-to-check-if-a-mutex-is-locked-in-go/

TL;DR: Can we check if a mutex is locked in Go? Yes, but not with a mutex API. Here’s a solution...

U

Developing the Next Generation of Coders with the Dev/Mission Uber Coding Fellowship

https://eng.uber.com/uber-open-source-coding-fellowship/

Uber is dedicated to furthering global citizenship, whether by connecting people to more...

View more articles