In this episode, I am thrilled to be joined by Matt Massicotte to kick off the "1 Billion Row Challenge" in Swift. The goal is to efficiently parse a massive file containing weather station data and calculate the min, max, and mean temperatures for each city. We set up a Swift package, explore basic file I/O methods, memory mapping, chunked reading, and implement a naive solution that processes the data and sets the stage for significant optimization in upcoming episodes.
Links Follow Matt Massicotte on Mastodon The 1 Billion Row Challenge 1BRC GitHub repository - find the python script and weather_stations.csv here mise - The tool manager / task runner I use in this episode Swift Concepts & APIs Discussed: Foundation Data.init(contentsOf:options:) (with .mappedIfSafe) FileHandle FileManager ByteCountFormatter CustomStringConvertible