Skip to content
/ 1brc Public
forked from gunnarmorling/1brc

1๏ธโƒฃ๐Ÿ๐ŸŽ๏ธ The One Billion Row Challenge -- A fun exploration of how quickly 1B rows from a text file can be aggregated with Java

Notifications You must be signed in to change notification settings

rishy2/1brc

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

1BRC

1๏ธโƒฃ๐Ÿ๐ŸŽ๏ธ The One Billion Row Challenge -- A fun exploration of how quickly 1B rows from a text file can be aggregated. The challenge was primarily foces on Java but I decided to solve it in Golang, while learning the language!

Record of iterations

Attempt 1 - Naive Approach

As far as the algorithm goes for this problem, I thought it was fairly trivial.

I used a hashmap to store each station name and allocated a size 4 array to store [min, max, sum, count] for each respective station. I knew I had a long way to go to optimize performance, but I wanted to see where this would get me.

I passed some of the test cases after messing with rounding. My program was functionally correct, but I ran into to a bunch of OOM (Out of Memory) errors when running the 1 billion row file.

My suspicions are on not using a pointer as a reference for the array and making a copy each time (crazy large input)

About

1๏ธโƒฃ๐Ÿ๐ŸŽ๏ธ The One Billion Row Challenge -- A fun exploration of how quickly 1B rows from a text file can be aggregated with Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 98.8%
  • Other 1.2%