HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
gunnarmorling
1brc
Java2024–2026
gunnarmorling / 1brc

1brc

1️⃣🐝🏎️ The One Billion Row Challenge -- A fun exploration of how quickly 1B rows from a text file can be aggregated with Java

34Distinct people
41Mentions
0Explicit recommenders
8.1KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

1️⃣🐝🏎️ The One Billion Row Challenge -- A fun exploration of how quickly 1B rows from a text file can be aggregated with Java

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by month41 dated mentions

Observed mentions: 2024-01-02 11:43:54 UTC to 2026-06-03 18:29:03 UTC.

0510152024-01-01 00:00:00 UTC to 2024-02-01 00:00:00 UTC (exclusive): 17 mentions; 2 submissions, 15 commentsJan 20242024-02-01 00:00:00 UTC to 2024-03-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-03-01 00:00:00 UTC to 2024-04-01 00:00:00 UTC (exclusive): 12 mentions; 0 submissions, 12 comments2024-04-01 00:00:00 UTC to 2024-05-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2024-05-01 00:00:00 UTC to 2024-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-06-01 00:00:00 UTC to 2024-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-07-01 00:00:00 UTC to 2024-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-08-01 00:00:00 UTC to 2024-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-09-01 00:00:00 UTC to 2024-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-10-01 00:00:00 UTC to 2024-11-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2024-11-01 00:00:00 UTC to 2024-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-12-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-01 00:00:00 UTC to 2025-02-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-02-01 00:00:00 UTC to 2025-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-03-01 00:00:00 UTC to 2025-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsMar 20252025-04-01 00:00:00 UTC to 2025-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-05-01 00:00:00 UTC to 2025-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-06-01 00:00:00 UTC to 2025-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-07-01 00:00:00 UTC to 2025-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-08-01 00:00:00 UTC to 2025-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-09-01 00:00:00 UTC to 2025-10-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2025-10-01 00:00:00 UTC to 2025-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-11-01 00:00:00 UTC to 2025-12-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025-12-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-01-01 00:00:00 UTC to 2026-02-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-02-01 00:00:00 UTC to 2026-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-03-01 00:00:00 UTC to 2026-04-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-04-01 00:00:00 UTC to 2026-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-05-01 00:00:00 UTC to 2026-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-06-01 00:00:00 UTC to 2026-07-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsJun 2026

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Jan 20242024-01-01 00:00:00 UTC2024-02-01 00:00:00 UTC17215
Feb 20242024-02-01 00:00:00 UTC2024-03-01 00:00:00 UTC101
Mar 20242024-03-01 00:00:00 UTC2024-04-01 00:00:00 UTC12012
Apr 20242024-04-01 00:00:00 UTC2024-05-01 00:00:00 UTC303
May 20242024-05-01 00:00:00 UTC2024-06-01 00:00:00 UTC000
Jun 20242024-06-01 00:00:00 UTC2024-07-01 00:00:00 UTC000
Jul 20242024-07-01 00:00:00 UTC2024-08-01 00:00:00 UTC000
Aug 20242024-08-01 00:00:00 UTC2024-09-01 00:00:00 UTC000
Sep 20242024-09-01 00:00:00 UTC2024-10-01 00:00:00 UTC000
Oct 20242024-10-01 00:00:00 UTC2024-11-01 00:00:00 UTC303
Nov 20242024-11-01 00:00:00 UTC2024-12-01 00:00:00 UTC000
Dec 20242024-12-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
Jan 20252025-01-01 00:00:00 UTC2025-02-01 00:00:00 UTC000
Feb 20252025-02-01 00:00:00 UTC2025-03-01 00:00:00 UTC000
Mar 20252025-03-01 00:00:00 UTC2025-04-01 00:00:00 UTC000
Apr 20252025-04-01 00:00:00 UTC2025-05-01 00:00:00 UTC000
May 20252025-05-01 00:00:00 UTC2025-06-01 00:00:00 UTC000
Jun 20252025-06-01 00:00:00 UTC2025-07-01 00:00:00 UTC000
Jul 20252025-07-01 00:00:00 UTC2025-08-01 00:00:00 UTC000
Aug 20252025-08-01 00:00:00 UTC2025-09-01 00:00:00 UTC000
Sep 20252025-09-01 00:00:00 UTC2025-10-01 00:00:00 UTC202
Oct 20252025-10-01 00:00:00 UTC2025-11-01 00:00:00 UTC000
Nov 20252025-11-01 00:00:00 UTC2025-12-01 00:00:00 UTC101
Dec 20252025-12-01 00:00:00 UTC2026-01-01 00:00:00 UTC101
Jan 20262026-01-01 00:00:00 UTC2026-02-01 00:00:00 UTC000
Feb 20262026-02-01 00:00:00 UTC2026-03-01 00:00:00 UTC000
Mar 20262026-03-01 00:00:00 UTC2026-04-01 00:00:00 UTC000
Apr 20262026-04-01 00:00:00 UTC2026-05-01 00:00:00 UTC000
May 20262026-05-01 00:00:00 UTC2026-06-01 00:00:00 UTC000
Jun 20262026-06-01 00:00:00 UTC2026-07-01 00:00:00 UTC101

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
1️⃣🐝🏎️ The One Billion Row Challenge Status Feb 4: The final leaderboards have been published. Congrats to all the winners, and a big thank you to everyone participating in this challenge as well as to everyone helping to organize it! Status Feb 3: All entries have been evaluated and I am in the process of finalizing the leaderboards. Status Feb 1: The challenge has been closed for new submissions. No new pull requests for adding submissions are accepted at this time. Pending PRs will be evaluated over the next few days. Status Jan 31: The challenge will close today at midnight UTC. Status Jan 12: As there has been such a large number of entries to this challenge so far (100+), and this is becoming hard to manage, please only create new submissions if you expect them to run in 10 seconds or less on the evaluation machine. Status Jan 1: This challenge is open for submissions! Sponsorship A big thank you to my employer Decodable for funding the evaluation environment and supporting this challenge! The One Billion Row Challenge (1BRC) is a fun exploration of how far modern Java can be pushed for aggregating one billion rows from a text file. Grab all your (virtual) threads, reach out to SIMD, optimize your GC, or pull any other trick, and create the fastest implementation for solving this task! The text file contains temperature values for a range of weather stations. Each row is one measurement in the format <string: station name>;<double: measurement>, with the measurement value having exactly one fractional digit. The following shows ten rows as an example: Hamburg;12.0 Bulawayo;8.9 Palembang;38.8 St. John's;15.2 Cracow;12.6 Bridgetown;26.9 Istanbul;6.2 Roseau;34.4 Conakry;31.2 Istanbul;23.0 The task is to write a Java program which reads the file, calculates the min, mean, and max temperature value per weather station, and emits the results on stdout like this (i.e. sorted alphabetically by station name, and the result values per station in the format <min>/<mean>/<max>, rounded to one fractional digit): {Abha=-23.0/18.0/59.2, Abidjan=-16.2/26.0/67.3, Abéché=-10.0/29.4/69.0, Accra=-10.1/26.4/66.4, Addis Ababa=-23.7/16.0/67.0, Adelaide=-27.8/17.3/58.5, ...} Submit your implementation by Jan 31 2024 and become part of the leaderboard! Results These are the results from running all entries into the challenge on eight cores of a Hetzner AX161 dedicated server (32 core AMD EPYC™ 7502P (Zen2), 128 GB RAM). # Result (m:s.ms) Implementation JDK Submitter Notes Certificates 1 00:01.535 link 21.0.2-graal Thomas Wuerthinger, Quan Anh Mai, Alfonso² Peterssen GraalVM native binary, uses Unsafe Certificate 2 00:01.587 link 21.0.2-graal Artsiom Korzun GraalVM native binary, uses Unsafe Certificate 3 00:01.608 link 21.0.2-graal Jaromir Hamala GraalVM native binary, uses Unsafe Certificate 00:01.880 link 21.0.1-open Serkan ÖZAL uses Unsafe Certificate 00:01.921 link 21.0.2-graal Van Phu DO GraalVM native binary, uses Unsafe Certificate 00:02.018 link 21.0.2-graal Stephen Von Worley GraalVM native binary, uses Unsafe Certificate 00:02.157 link 21.0.2-graal Roy van Rijn GraalVM native binary, uses Unsafe Certificate 00:02.319 link 21.0.2-graal Yavuz Tas GraalVM native binary, uses Unsafe Certificate 00:02.332 link 21.0.2-graal Marko Topolnik GraalVM native binary, uses Unsafe Certificate 00:02.367 link 21.0.1-open Quan Anh Mai uses Unsafe Certificate 00:02.507 link 21.0.1-open gonix uses Unsafe Certificate 00:02.557 link 21.0.1-open yourwass uses Unsafe Certificate 00:02.820 link 22.ea.32-open Li Lin uses Unsafe Certificate 00:02.995 link 21.0.2-graal tivrfoa GraalVM native binary, uses Unsafe Certificate 00:02.997 link 21.0.1-open gonix Certificate 00:03.095 link 21.0.2-graal Jamal Mulla GraalVM native binary, uses Unsafe Certificate 00:03.210 link 21.0.1-open Quan Anh Mai Certificate 00:03.298 link 21.0.1-graal Subrahmanyam uses Unsafe Certificate 00:03.431 link 21.0.1-graal Roman Musin GraalVM native binary, uses Unsafe Certificate 00:03.469 link 21.0.2-graal Elliot Barlas GraalVM native binary, uses Unsafe Certificate 00:03.698 link 21.0.1-graal Jason Nochlin Certificate 00:03.785 link 21.0.2-graal zerninv GraalVM native binary, uses Unsafe Certificate 00:03.820 link 21.0.2-graal John Ziamos GraalVM native binary, uses Unsafe Certificate 00:03.902 link 21.0.1-open Juan Parera Certificate 00:03.966 link 21.0.1-open Jin Cong Ho uses Unsafe Certificate 00:03.991 link 21.0.1-graal Vaidhy Mayilrangam uses Unsafe Certificate 00:04.066 link 21.0.1-open JesseVanRooy uses Unsafe Certificate 00:04.101 link 21.0.2-graal Jaime Polidura GraalVM native binary, uses Unsafe Certificate 00:04.209 link 21.0.1-open Giovanni Cuccu Certificate 00:04.474 link 21.0.1-open Roman Stoffel Certificate 00:04.676 link 21.0.2-tem Peter Levart Certificate 00:04.684 link 21.0.1-open Florin Blanaru uses Unsafe Certificate 00:04.701 link 21.0.1-open Dr Ian Preston Certificate 00:04.741 link 21.0.1-open Cliff Click uses Unsafe Certificate 00:04.800 link 21.0.1-open Parker Timmins Certificate 00:04.884 link 21.0.1-open Aleksey Shipilëv Certificate 00:04.920 link 21.0.1-graal Subrahmanyam Certificate 00:05.077 link 21.0.2-graal Jonathan Wright GraalVM native binary, uses Unsafe Certificate 00:05.142 link 21.0.1-open Arjen Wisse Certificate 00:05.167 link 21.0.2-open Yevhenii Melnyk Certificate 00:05.235 link 21.0.1-open unbounded Certificate 00:05.336 link java Sumit Chaudhary uses Unsafe Certificate 00:05.354 link 21.0.2-graal Arman Sharif GraalVM native binary, uses Unsafe Certificate 00:05.478 link 21.0.1-open Olivier Bourgain uses Unsafe Certificate 00:05.559 link 21.0.1-graal Panagiotis Drakatos GraalVM native binary Certificate 00:05.887 link 21.0.1-graal Charlie Evans uses Unsafe Certificate 00:05.979 link 21.0.1-graal Sam Pullara Certificate 00:06.166 link 21.0.1-ope
Read the full README on GitHub

What Hacker News says

41 sources
> I’ve done performance-engineering for decades in Java, C++, and C for both data analytics and supercomputing/HPC. Java performs significantly worse than C++ in all cases without exception. I've done similar work (not supercomputing/HPC, but yes for soft and hard realtime software, including safety-critical software) and I couldn't disagree more. Of course, we didn't get to write every program in both Java and C++, but the main question was how much effort it took to achieve the required performance. Over multiple projects it was clear that hitting the performance targets was, on the whole, significantly easier in Java. > This is the result you should expect from first principles; something has gone horribly wrong with your software optimization if Java is faster than C++ or even Rust. Strong disagreement here, but we need to be specific
Read the rest
about what we mean when we say performance. It is undoubtedly true that for every Java program there exists a C++ program with the same performance, and the proof is simple: every Java program is a C++ program with the classes being input. But that C++ program is close to 2MLOC long. The same could also be said about a C++ program vs. an Assembly program, as every C++ program could be written as an Assembly program. But when I talk about performance, I refer to what I think most programmers care about when it comes to performance. Not how fast can a program hypothetically be given enough effort and expertise, but how fast can my program be in my budget. Both speculative compiler optimisations and memory management optimisations are simply not an option for low level languages due to their constraints, and they are very powerful global optimisations. Given a lot of expertise and effort (that must continue throughout the software's lifetime, and often increases as it evolves) you can work around these limitations, but Java was designed so that you can benefit from them, which means more performance per unit of effort. In large programs more general constructs (e.g. dynamic dispatch) and patterns (concurrency, great variance in object lifetime) grow in prevalence, and low level languages require more effort and discipline to work around their shortcomings in these areas. Optimising JITs that allow aggressive speculative optimisations and moving collectors were invented and adopted to address these shortcomings. You could claim that the advanced mechanisms that were developed to address C++'s performance issues have failed to achieve their goal, although it won't be easy and much of it comes down to empirical questions of which patterns arise more or less frequently in software, but given that this is what these mechanisms were at least intended to achieve, you certainly can't claim that they fail to do so "from first principles". Some compilation optimisations need speculation; some memory management optimisations need moving pointers. Not having these optimisations available in a program you can write without a lot of special effort cannot make it faster "from first principles". So no, I don't believe at all that something has to go wrong for a Java program to be faster than a C++ program given a certain budget for the program. Indeed, in larger, more complex programs, I believe the very opposite is true. In most situations, if you get the same performance in C++ as you do in Java, then something has gone terribly wrong with your Java program. As someone who's worked on a pretty famous JVM feature (virtual threads), I can tell you that we and the designers of low-level languages consciously make different performance tradeoffs because we optimise for different programs and people, and have different preferences when it comes to average case vs. worst case, but there is no universal dominance in performance to either one of these approaches over the other. One obvious example was our decision to remove Unsafe from Java. Some Java developers voiced opposition, citing a program speed competition (the "one-billion-row challenge" [1]) where Unsafe improved the performance of an entry (which was later cloned and tweaked by others) by 25%. But we saw it as further motivation for the decision. Among over a dozen performance experts who submitted entries, only one was able to write a program efficient enough for Unsafe to make a big difference, and the variance in the results even among the top 20 or so entries was larger than Unsafe's improvement. By removing Unsafe, we would harm that one expert's program, but it would allow us to perform more aggressive constant-folding optimisations that would result in much greater performance improvements over the entire ecosystem. Even from a design philosophy perspective alone, this removal of control to the detriment of some programs "for the greater good" of performance over the entire ecosystem is almost unthinkable in low level languages, because control is what they're for. Did that decision make Java a faster or a slower language? That depends on how you look at performance. [1]: https://github.com/gunnarmorling/1brc
In Every Byte Matters
I'm working on a video / post on how to solve the 1 billion row challenge (https://github.com/gunnarmorling/1brc) and get a competitively fast result while keeping the code readable and maintainable. So far I'm within spitting distance of the winning entries without using any unsafe code or bit twiddling tricks or custom JVMs or anything like that, and having all the concerns nicely separated and modularized. Excited to share soon!
In Ask HN: What Are You Working On? (Nov 2025)
Looking at the fastest solution, the convertIntoNumber() function is where the magic happens. Specifically, line 318. The line above (long digits ... ) converts from ASCII digits ('0'-'9') to actual numeric digits (range 0-9) Line 318 does the shift into position and addition to combine the 1-3 digits via one multiplication, left-shift and mask operation. see https://github.com/gunnarmorling/1brc/blob/main/src/main/jav...
In 1BRC Coding Challenge: Nerd Sniping the Java Community
Presenter of that talk here, very cool to see it being shared here. Running 1BRC was immensely fun, I learned a ton from it. Had you told me before how far the community would be able to push this, I'd have not believed you. One main take-away for me was that you could improve performance by one order of magnitude over the baseline basically by just doing a good job and avoiding basic mistakes. The resulting code is still well readable and maintainable. In most scenarios, this is where you should stop. If you want to improve by another order of magnitude (like leaders in the challenge did), code becomes completely non-idiomatic, super-dense, and hard to maintain. You should go there only where it really, really matters, like when building a database kernel for instance. Or well, when trying to win a coding challenge ;) Some more resources
Read the rest
for those interested: * Blog post with the results: https://www.morling.dev/blog/1brc-results-are-in/ * Show & Tell, featuring implementations in languages other than Java: https://github.com/gunnarmorling/1brc/discussions/categories... * List of many more blog posts discussing 1BRC in different languages: https://github.com/gunnarmorling/1brc?tab=readme-ov-file#1br... * 3h deep-dive into the implementation techniques by Thomas Würthinger and Roy van Rijn, two of the top participants of the challenge: https://www.youtube.com/watch?v=_w4-BqeeC0k
In 1BRC Coding Challenge: Nerd Sniping the Java Community

Showing the 15 most recent of 41 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.