1 BILLION row challenge in Go - 2.5 Seconds!

  Переглядів 7,949

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 24 дні тому
Hello Duane! This is some amazing stuff man! Keep making these and enlightening us! Thanks a lot!
@duanebester
@duanebester 24 дні тому
Thanks, will do!
@kevinkim7068
@kevinkim7068 25 днів тому
Thank you for blessing us🙏
@duanebester
@duanebester 24 дні тому
Any time
@jonathanchapa4513
@jonathanchapa4513 24 дні тому
As always, banger video! 🤤
@duanebester
@duanebester 24 дні тому
You already know!
@cariyaputta
@cariyaputta 12 днів тому
Thanks for sharing.
@duanebester
@duanebester 12 днів тому
You bet
@ashersamuel958
@ashersamuel958 21 день тому
Great content, but the autopilot is taking the fun out of it
@duanebester
@duanebester 21 день тому
Great point. Will disable going forward!
@eZe00
@eZe00 24 дні тому
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 24 дні тому
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
@renkinjutsu01
@renkinjutsu01 20 днів тому
It takes me 1 minute just to cat the file to /dev/null
@duanebester
@duanebester 20 днів тому
Yep the aggregation calculations are what increases the time drastically
@keemykim92
@keemykim92 24 дні тому
How Fast can Python Parse 1 Billion Rows of Data?
16:31
Doug Mercer
Переглядів 130 тис.
New Go Billion Row Challenge w/ Great Optimizations | Prime Reacts
39:42
Эта Мама Испортила Гендер-Пати 😂
00:40
Глеб Рандалайнен
Переглядів 4,4 млн
НЕОБЫЧНЫЙ ЛЕДЕНЕЦ
00:49
Sveta Sollar
Переглядів 3,8 млн
I Rewrote This Entire Main File // Code Review
16:08
The Cherno
Переглядів 82 тис.
Why Doesn’t Everyone Use This Animation???
23:59
Theo - t3․gg
Переглядів 76 тис.
1 billion row challenge in Rust using Apache Arrow
9:12
Josiah Parry
Переглядів 3,5 тис.
How To Stream Large Files Over TCP In Golang
17:50
Anthony GG
Переглядів 27 тис.
1 Billion Rows Challenge
8:58
ThePrimeTime
Переглядів 109 тис.
Testcontainers have forever changed the way I write tests
12:11
Dreams of Code
Переглядів 87 тис.
Master Go Programming With These Concurrency Patterns (in 40 minutes)
46:15
Trying Zig Part 1
1:30:00
TheVimeagen
Переглядів 50 тис.
98% Cloud Cost Saved By Writing Our Own Database
21:45
ThePrimeTime
Переглядів 225 тис.
Крыса даже не поняла почему не может подняться
0:21
Хорошие Новости
Переглядів 8 млн
КТО сильнее: В Африке встретились львы, жираф и гиена
0:16
Собиратель новостей
Переглядів 1 млн
МАЛЬЧИК ДОИГРАЛСЯ😹 тг: Сербулат
0:10
Дурнєв дивиться сторіс ZОМБІ #47
53:48
Aleksey Durnev
Переглядів 724 тис.