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

  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 22 15

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

    🌐 1brc.dev website for @1brc

    TypeScript 6 4

  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 1

  4. .github .github Public

    ✨ GitHub meta repo

Repositories

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

    🌐 1brc.dev website for @1brc

    TypeScript 6 MIT 4 13 1 Updated Apr 24, 2024
  • .github Public

    ✨ GitHub meta repo

    0 0 0 0 Updated Apr 14, 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.

    Java 22 Apache-2.0 15 0 1 Updated Apr 1, 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.

    Java 1 Apache-2.0 0 0 0 Updated Jan 22, 2024

Top languages

Loading…

Most used topics

Loading…