Skip to content

AlvaroJoseLopes/1BRC

Repository files navigation

1BRC challenge

Solution for 1BRC (The One Billion Row Challenge)

Solutions

Baseline

Simple solution that reads the lines sequentially and aggregate the result line by line (count, min, max and sum).

Iterators

This solution uses iterators to yield chunks of data from the file and aggregates the final result chunk by chunk.

Channels

Solution that uses channels to implement MapReduce pattern.

One worker is responsible for reading the file in chunks and sending each chunk to the jobs channel.

N consumers retrieve chunks from the jobs channel and calculate the statistics (count, min, max and sum of the chunk), sending it to the result channel.

The main goroutine consumes the result and reduces each chunk result and reports the final statistics.

About

1 Billion Rows Challenges

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published