Home / Companies / QuestDB / Blog / Post Details
Content Deep Dive

The Billion Row Challenge (1BRC) - Step-by-step from 71s to 1.7s

Blog post from QuestDB

Post Details
Company
Date Published
Author
Marko Topolnik
Word Count
5,822
Language
English
Hacker News Points
-
Summary

QuestDB's open-source time-series database highlighted a unique Java programming competition where contestants had to process a massive dataset of 1 billion rows to calculate temperature statistics per weather station. The challenge, initiated by Gunnar Morling, required participants to optimize their Java code to achieve the fastest possible processing time using innovative techniques, such as SIMD and custom data structures, while leveraging Java's latest features like GraalVM. The competition encouraged collaboration and learning on GitHub, allowing contestants to share and refine their solutions, ultimately resulting in significant performance gains. The winning entry was submitted by Thomas Wuerthinger, with the top solutions showcasing advanced optimization strategies that dramatically reduced processing times from an initial 71 seconds to around 1.5 seconds. These strategies included using GraalVM for JVM optimizations, SWAR techniques for efficient data parsing, and work-stealing for parallel processing, demonstrating the power of community-driven problem-solving in pushing the boundaries of Java performance.