gunnarmorling/1brc
View on GitHub ↗ ★ 8,144 Java
1️⃣🐝🏎️ The One Billion Row Challenge -- A fun exploration of how quickly 1B rows from a text file can be aggregated with Java
41 mentions on Hacker News by 34 people: 2 stories, 39 comments · first 2024-01-02 · latest 2026-06-03
20082026
-
…decision make Java a faster or a slower language? That depends on how you look at performance. [1]: https://github.com/gunnarmorling/1brc
comment by pron · 2026-06-03 · in Every Byte Matters -
…but with somewhat simpler statistics – though the core engineering challenges are very similar. https://github.com/gunnarmorling/1brc
comment by SatvikBeri · 2025-12-16 · in In Defense of Matlab Code -
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…
comment by makmanalp · 2025-11-09 · in Ask HN: What Are You Working On? (Nov 2025) -
Java is really fast: https://github.com/gunnarmorling/1brc
comment by ludovicianul · 2025-09-17 · in Java 25 officially released -
…row aggregation challenge, especially the perfect hashing part, all the top entries all used it. https://github.com/gunnarmorling/1brc
comment by codegladiator · 2025-09-14 · in The unreasonable effectiveness of modern sort algorithms -
…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...
comment by canucker2016 · 2024-10-31 · in 1BRC Coding Challenge: Nerd Sniping the Java Community -
…* 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/gunn
comment by gunnarmorling · 2024-10-30 · in 1BRC Coding Challenge: Nerd Sniping the Java Community -
Java is very fast: https://github.com/gunnarmorling/1brc
comment by ludovicianul · 2024-10-21 · in Skeptical of rewriting JavaScript tools in "faster" languages -
…be the code to beat. Ideally with only 8 cores but any number of cores is also very interesting. https://github.com/gunnarmorling/1brc/discussions/710
comment by pama · 2024-04-15 · in The One Billion Row Challenge in CUDA -
…name and trademark for their implementation of smt, but the benchmark was run on an amd cpu) [0] https://github.com/gunnarmorling/1brc/issues/189#issuecommen...
comment by fulafel · 2024-04-15 · in The One Billion Row Challenge in CUDA -
The 1brc benchmark has the data in a RAM disk[0], there's no disk IO. [0] https://github.com/gunnarmorling/1brc#evaluating-results
comment by fulafel · 2024-04-14 · in The One Billion Row Challenge in CUDA -
…that they can compete with C/CPP performance - assuming you go out of your way to optimize for it. https://github.com/gunnarmorling/1brc
comment by declaredapple · 2024-03-19 · in Garnet – A new remote cache-store from Microsoft Research -
Not being IO bound is part of the test design in this case. https://github.com/gunnarmorling/1brc?tab=readme-ov-file#eva... "Programs are run from a RAM disk (i.o. the IO overhead for loading the file from disk is not relevant)"
comment by fulafel · 2024-03-10 · in 1BRC merykitty's magic SWAR: 8 lines of code explained in 3k words -
…addition, the official 1BRC explicitly evaluated results on a RAM disk to avoid I/O speed entirely: https://github.com/gunnarmorling/1brc?tab=readme-ov-file#eva... "Programs are run from a RAM disk (i.o. the IO overhead for loading the…
comment by benhoyt · 2024-03-10 · in 1BRC merykitty's magic SWAR: 8 lines of code explained in 3k words -
…(throwing away the next line), whereas the original adds it to a map and returns the next line. [1] https://github.com/gunnarmorling/1brc/blob/dfec2cdbe6a0334cf...
comment by __float · 2024-03-09 · in 1BRC merykitty's magic SWAR: 8 lines of code explained in 3k words -
…this like I do is wrong because they all run on different machines with different performances. 1. https://github.com/gunnarmorling/1brc/discussions/251#discus... 2. https://github.com/gunnarmorling/1brc/discussions/241#discus... 3.…
comment by Alifatisk · 2024-03-04 · in The One Billion Row Challenge in Go: from 1m45s to 4s in nine solutions -
There's the "Show & Tell", where folks have shared implementations in many different languages: https://github.com/gunnarmorling/1brc/discussions/categories... .
comment by gunnarmorling · 2024-03-03 · in The One Billion Row Challenge in Go: from 1m45s to 4s in nine solutions -
Here’s a thread on results with duckdb, I don’t mean to discourage you taking a shot at all though: https://github.com/gunnarmorling/1brc/discussions/39
comment by llimllib · 2024-03-03 · in The One Billion Row Challenge in Go: from 1m45s to 4s in nine solutions -
If you are in “javaland” look at billion row challenge, you will learn a lot - https://github.com/gunnarmorling/1brc
comment by bdangubic · 2024-03-03 · in Ask HN: How can I learn about performance optimization? -
…rust solutions in the "Show and Tell" linked above, for example this fairly readable one at 15.5s: https://github.com/gunnarmorling/1brc/discussions/57 A comment above referencing Python "polars" actually has rust polars, std, and SIMD…
comment by n8henrie · 2024-03-03 · in The One Billion Row Challenge in Go: from 1m45s to 4s in nine solutions -
For what it's worth, on my machine the simple/idiomatic "baseline" Java solution ( https://github.com/gunnarmorling/1brc/blob/main/src/main/jav... ) takes 2m0s, compared to 1m45s for my simple Go version. So Go is a bit better for the…
comment by benhoyt · 2024-03-03 · in The One Billion Row Challenge in Go: from 1m45s to 4s in nine solutions -
On my machine the simple/idiomatic "baseline" Java solution ( https://github.com/gunnarmorling/1brc/blob/main/src/main/jav... ) takes 2m0s, compared to 1m45s for my simple Go version.
comment by benhoyt · 2024-03-03 · in The One Billion Row Challenge in Go: from 1m45s to 4s in nine solutions -
Instructions on how to create it can be found here: https://github.com/gunnarmorling/1brc?tab=readme-ov-file#run... The Python version: https://github.com/gunnarmorling/1brc/blob/main/src/main/pyt...
comment by schu · 2024-03-03 · in The One Billion Row Challenge in Go: from 1m45s to 4s in nine solutions -
Rust: * https://github.com/gunnarmorling/1brc/discussions/57 * https://github.com/mtb0x1/1brc My friend also claims he is going to try it in Prolog. We'll see :)
comment by flopsamjetsam · 2024-02-26 · in Lessons learned from doing the one billion row challenge -
It depends on the machine, but some people got very fast results. https://github.com/gunnarmorling/1brc/discussions/57 Why would you use Javascript for that?
comment by hyfgfh · 2024-01-29 · in One Billion Row Challenge Shows Java Can Process 1B Rows File in 2 Seconds -
…minutes written in java in 5 minutes. The official baseline is quite simple and runs in about ~3min https://github.com/gunnarmorling/1brc/blob/main/src/main/jav...
comment by quadrature · 2024-01-29 · in One Billion Row Challenge Shows Java Can Process 1B Rows File in 2 Seconds -
…and stuff (even a Fortran solution that takes 3 seconds without going too far in optimization): https://github.com/gunnarmorling/1brc/discussions/categories... I like this discussion because while the original is about "what can you do in…
comment by rakoo · 2024-01-29 · in One Billion Row Challenge Shows Java Can Process 1B Rows File in 2 Seconds -
…are winning because Unsafe lets them bypass bounds checks. The current fastest safe version: https://github.com/gunnarmorling/1brc/blob/main/src/main/jav...
comment by papercrane · 2024-01-29 · in One Billion Row Challenge Shows Java Can Process 1B Rows File in 2 Seconds -
Link to the Git Repo for those that want to try the challenge: https://github.com/gunnarmorling/1brc/
comment by aeonik · 2024-01-29 · in One Billion Row Challenge Shows Java Can Process 1B Rows File in 2 Seconds -
…CSV in just 2 seconds. In slow Java. It just requires some skills, which is hard to find nowadays. https://github.com/gunnarmorling/1brc
comment by HackerThemAll · 2024-01-26 · in Command-line Tools can be 235x Faster than your Hadoop Cluster (2014) -
…both C# and C++ blazing past it: https://hotforknowledge.com/2024/01/13/1brc-in-dotnet-among-... https://github.com/gunnarmorling/1brc/discussions/67
comment by neonsunset · 2024-01-23 · in From slow to SIMD: A Go optimization story -
…been the change for a few entries that allowed getting below the 3-second barrier in the test. 1. https://github.com/gunnarmorling/1brc
comment by greid · 2024-01-17 · in JEP Draft: Deprecate memory-access methods in sun.misc.unsafe for removal -
…in RAM and not have to be read from disk. This gets the runtime down to 1.1s for this AMD 2950x ( https://github.com/gunnarmorling/1brc/discussions/46#discuss... ). With SIMD and certain assumptions about the input this can seemingly be…
comment by dvko · 2024-01-06 · in The One Billion Row Challenge -
Look at the leaderboard for the fastest solutions https://github.com/gunnarmorling/1brc#results The fastest is currently at 12 seconds (not on M3 Pro though).
comment by bufferoverflow · 2024-01-05 · in The One Billion Row Challenge -
It's all on GitHub Multiple languages: https://github.com/gunnarmorling/1brc/discussions My repo: https://github.com/buybackoff/1brc
comment by buybackoff · 2024-01-04 · in The One Billion Row Challenge -
…to ensure there aren't hash collisions without doing a complete comparison between the names. [1] https://github.com/gunnarmorling/1brc/pull/56
comment by spullara · 2024-01-04 · in The One Billion Row Challenge -
See the "Show & Tell", where folks are discussing solutions in different languages, including Rust: https://github.com/gunnarmorling/1brc/discussions/categories... .
comment by gunnarmorling · 2024-01-04 · in The One Billion Row Challenge -
…wrong results if enough different cities are in the dataset. Or am I missing something? [0] https://github.com/gunnarmorling/1brc/blob/main/src/main/jav...
comment by planb · 2024-01-04 · in The One Billion Row Challenge -
…looks like there are submissions in several languages. Go, Rust, Python, and C++, to name a few [0] https://github.com/gunnarmorling/1brc/discussions
comment by kriskrunch · 2024-01-04 · in The One Billion Row Challenge