The One Billion Row Challenge written in Go.
This solution is written in a single source file as specified in the challenge in ./cmd/1brc/1brc.go
.
# Builds the binary, 1brc.
go build ./cmd/1brc
# Runs 1brc with the data file <measurements.txt> as its argument.
# <measurements.txt> is the file generated by the original 1brc challenge
./1brc <measurements.txt>
Generating the measurements.txt file can be done from the original 1brc challenge here.
As the challenge's parameters and constraints are well defined, aggressive liberties have been taken in regards to error handling in favor for performance as this is performance driven challenge as opposed to a production application with robust error handling requirements.
A CHANGELOG is maintained to track all optimizations made to the solution.