Skip to content
@1brc

The One Billion Row Challenge

1️⃣🐝🏎

📚 Read more on the website!

Your mission, should you choose to accept it, is to write a program that retrieves temperature measurement values from a text file and calculates the min, mean, and max temperature per weather station. There's just one caveat: the file has 1,000,000,000 rows! That's more than 10 GB of data! 😱

The text file has a simple structure with one measurement value per row:

Hamburg;12.0
Bulawayo;8.9
Palembang;38.8
Hamburg;34.2
St. John's;15.2
Cracow;12.6
... etc. ...

The program should print out the min, mean, and max values per station, alphabetically ordered. The format that is expected varies slightly from language to language, but the following example shows the expected output for the first three stations:

Hamburg;12.0;23.1;34.2
Bulawayo;8.9;22.1;35.2
Palembang;38.8;39.9;41.0

Oh, and this input.txt is different for each submission since it's generated on-demand. So no hard-coding the results! 😉

Choose from one of the languages below to get started! 🚀
Don't see your favorite language listed? Open an Issue to add it!


Java C/C++ C# Python Go JavaScript Rust Zig PHP

Popular repositories Loading

  1. nodejs nodejs Public

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

    Java 45 35

  2. 1brc.github.io 1brc.github.io Public

    🌐 1brc.dev website for @1brc

    TypeScript 14 8

  3. bun bun Public

    1️⃣🐝🏎️ The One Billion Row Challenge with Bun (a new JS runtime) -- A fun exploration of how quickly 1B rows from a text file can be aggregated with different languages.

    Java 2 4

  4. .github .github Public

    ✨ GitHub meta repo

Repositories

Showing 4 of 4 repositories
  • 1brc.github.io Public

    🌐 1brc.dev website for @1brc

    1brc/1brc.github.io’s past year of commit activity
    TypeScript 14 MIT 8 25 0 Updated Jul 25, 2024
  • bun Public

    1️⃣🐝🏎️ The One Billion Row Challenge with Bun (a new JS runtime) -- A fun exploration of how quickly 1B rows from a text file can be aggregated with different languages.

    1brc/bun’s past year of commit activity
    Java 2 Apache-2.0 4 0 2 Updated Jun 21, 2024
  • nodejs Public

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

    1brc/nodejs’s past year of commit activity
    Java 45 Apache-2.0 35 0 3 Updated Jun 19, 2024
  • .github Public

    ✨ GitHub meta repo

    1brc/.github’s past year of commit activity
    0 0 1 0 Updated Apr 14, 2024

Top languages

Loading…

Most used topics

Loading…