1 BILLION row challenge in Go - 2.5 Seconds!

  Рет қаралды 8,050

Duane Bester

Duane Bester

Күн бұрын

In this video we look at how we can aggregate 1 billion rows of weather station data in as little time as possible. We start with a naive approach and optimize to go from 1m30 seconds to 2.5 seconds. Using the power of memory mapped files, a custom hash map implementation, and multiple Goroutines.
Implementation: github.com/duanebester/1brc-go
Thanks to Ben Hoyt
benhoyt.com/writings/go-1brc/
00:00 Intro
00:54 Simple Implementation
09:55 Advanced - Using mmap
15:01 Custom integer parsing
22:12 Parallel processing
34:16 Custom hashmap
42:48 Results

Пікірлер: 17
@ishaanrawal9327
@ishaanrawal9327 27 күн бұрын
Hello Duane! This is some amazing stuff man! Keep making these and enlightening us! Thanks a lot!
@duanebester
@duanebester 26 күн бұрын
Thanks, will do!
@kevinkim7068
@kevinkim7068 27 күн бұрын
Thank you for blessing us🙏
@duanebester
@duanebester 27 күн бұрын
Any time
@jonathanchapa4513
@jonathanchapa4513 27 күн бұрын
As always, banger video! 🤤
@duanebester
@duanebester 27 күн бұрын
You already know!
@cariyaputta
@cariyaputta 15 күн бұрын
Thanks for sharing.
@duanebester
@duanebester 14 күн бұрын
You bet
@eZe00
@eZe00 26 күн бұрын
Nice video. However, you are calculating the average while you are meant to keep track of the mean of all the values. That means having an array in the struct to keep track of all the values seen. Subscribed!
@duanebester
@duanebester 26 күн бұрын
I think “mean” in this case is the arithmetic mean, which is the same as the average; summing the numbers in the set and dividing by total count (per station). My output matches the baseline output so I feel pretty confident in the implementation
@ashersamuel958
@ashersamuel958 24 күн бұрын
Great content, but the autopilot is taking the fun out of it
@duanebester
@duanebester 23 күн бұрын
Great point. Will disable going forward!
@renkinjutsu01
@renkinjutsu01 23 күн бұрын
It takes me 1 minute just to cat the file to /dev/null
@duanebester
@duanebester 23 күн бұрын
Yep the aggregation calculations are what increases the time drastically
@keemykim92
@keemykim92 27 күн бұрын
How Fast can Python Parse 1 Billion Rows of Data?
16:31
Doug Mercer
Рет қаралды 132 М.
New Go Billion Row Challenge w/ Great Optimizations | Prime Reacts
39:42
ISSEI funny story😂😂😂Strange World | Magic Lips💋
00:36
ISSEI / いっせい
Рет қаралды 104 МЛН
маленький брат прыгает в бассейн
00:15
GL Show Russian
Рет қаралды 3,6 МЛН
Mini Jelly Cake 🎂
00:50
Mr. Clabik
Рет қаралды 16 МЛН
НЕОБЫЧНЫЙ ЛЕДЕНЕЦ
00:49
Sveta Sollar
Рет қаралды 6 МЛН
I Rewrote This Entire Main File // Code Review
16:08
The Cherno
Рет қаралды 84 М.
The One Billion Row Challenge - .NET Edition | Merge Conflict ep. 392
38:46
Merge Conflict Podcast
Рет қаралды 1 М.
Why Doesn’t Everyone Use This Animation???
23:59
Theo - t3․gg
Рет қаралды 81 М.
Master Go Programming With These Concurrency Patterns (in 40 minutes)
46:15
Testcontainers have forever changed the way I write tests
12:11
Dreams of Code
Рет қаралды 91 М.
My Viewers DDoSed my Go App
2:36:31
Tsoding Daily
Рет қаралды 50 М.
Solid Programming - No Thanks
32:00
ThePrimeTime
Рет қаралды 199 М.
98% Cloud Cost Saved By Writing Our Own Database
21:45
ThePrimeTime
Рет қаралды 230 М.
Мы играли всей семьей
0:27
Даша Боровик
Рет қаралды 2,8 МЛН
ОБЫЧНЫЙ ДЕНЬ РОЖДЕНИЯ 😅 |  #mellstroy #shorts
0:18
Let's all try it too‼︎#magic#funny#junjunworld
0:34
Jun Jun World / ジュンジュンワールド
Рет қаралды 10 МЛН
🤫
0:15
Nhamnoys
Рет қаралды 22 МЛН
Я ПРОТИВ МЛАДШЕЙ СЕСТРЫ серия 2
1:01
Li ALINA
Рет қаралды 2,6 МЛН
Jack drinks Yujiro’s protein! 👹 @GFuelEnergy #yujirohanma
0:42
The Logan Chitwood
Рет қаралды 12 МЛН