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 3.4 seconds. As I go, I’ll show how I used Go’s profiler to see where the time was being spent.
Source: The One Billion Row Challenge in Go: from 1m45s to 3.4s in nine solutions