A Benchmarking Story: Go, Elixir, and a 3500x speedup

  Рет қаралды 4,300

tutoriaLinux

tutoriaLinux

Күн бұрын

Buckle up, we hit a lot of practical topics in this one. This is the story of how I implemented a small solution in Go and Elixir and how that led me down a benchmarking rabbithole. Topics covered: Go, Elixir, Benchmarking in both languages, some basic datastructures and algorithms troubleshooting, and using benchmarks as a kind of flashlight so I can see what effect my changes are having on performance.
0:00 The problem
3:11 Go code explanation
8:17 Elixir code explanation (maybe this can be a separate video?)
13:05 Go Benchmark
14:43 Go Benchmarking Code Walkthrough
15:57 Elixir Benchmark 1
17:05 Elixir Benchmarking Code Walkthrough
18:19 Elixir vs. Go Speed, unoptimized
19:10 WTF is going on
22:00 Solution - Elixir Dynamic Arrays
24:56 Elixir vs. Go, round 2
26:18 What I learned
29:00 a crazy idea
I know the font is too small, sorry about that. Next one will have a giant font that my grandmother could read.
The repo is here: github.com/groovemonkey/go-el...

Пікірлер: 18
@crazzzik
@crazzzik 11 ай бұрын
Do more videos in general. They are helpful in more than one way. I used to say that college professors come in two flavors: those who know the tools and those who got the stories. The first kind keeps you on track to learn a tool that you will (might) need in your work. The second time will tell you stories from the field and inspire you to get there (often at the cost of a lab time). You seem to have enough experience to share some IT related technical stuff as well as stories associated with them. It is very valuable to the community in general. It doesn't have to be expert opinion, just a log of your journey that we can learn from and get some entertainment out of.
@tutoriaLinux
@tutoriaLinux 11 ай бұрын
Sorry for the smallish font -- next time I'll bump that way up. Here's the code if you want to explore/benchmark/improve it yourself: github.com/groovemonkey/go-elixir-benchmark
@bearsstuff
@bearsstuff 11 ай бұрын
still here at the end buddy. Do the projects!
@IanWeston
@IanWeston 11 ай бұрын
Absolutely would love to see some projects! Also great to see you trying out Neovim!
@tutoriaLinux
@tutoriaLinux 11 ай бұрын
Yeah, I'm pumped about doing some programming projects, thanks! And yeah, I became addicted to neovim pretty hard about 4 months ago. I'd been casually using vim keybindings in other places but finally got serious about it this year and it's really paid off.
@aghileslounis
@aghileslounis 24 күн бұрын
Nice video! What's your editor's theme?
@nateshrager512
@nateshrager512 10 ай бұрын
Would love some go projects!
@harshpatel105
@harshpatel105 9 ай бұрын
From your neovim podcast! I am in the process of switching from vsc to nvim. How about you make a video as well about nvim and your workflow?
@tutoriaLinux
@tutoriaLinux 9 ай бұрын
Awesome, working on it now!
@EightSixx
@EightSixx 11 ай бұрын
GO GO GO!
@swiftsifu
@swiftsifu 10 ай бұрын
still here :)
@samrybkin9184
@samrybkin9184 8 ай бұрын
Hi man I don't visit you channel for a while how you become go developer if I am not wrong you was as DevOps in past? Why you start to code on Go? As go developer what you thing about specially in the comparison with python? I mean about syntax, ease of coding, code support?
@kristun216
@kristun216 8 ай бұрын
I wonder if you could build it radically different, when you start a new RandomWord module in Elixir you could spawn an Agent process (very cheap in BEAM) with the shuffled list of words and every time you take the word out you simply pop the front most items from the agent keeping the rest of the shuffled in memory.
@kristun216
@kristun216 8 ай бұрын
Forget this, I tried with agent and `shuffle` was a huge bottleneck in hindsight. Might be better off keeping the "length" as a state and just do random number generator with Map.get access instead
@uptimeroadtrips6365
@uptimeroadtrips6365 11 ай бұрын
nice,
@linuxlegion4312
@linuxlegion4312 9 ай бұрын
As I remember you have had several videos promoting Emacs as the best editor,and now you are using neovim,have you changed your mind.
@edgardevelops
@edgardevelops 3 ай бұрын
so Go is faster than Elixir.
@hja-wo3ll
@hja-wo3ll 23 күн бұрын
Naturally
Beginners Should Think Differently When Writing Golang
11:35
Anthony GG
Рет қаралды 95 М.
From $erverless To Elixir | Prime Reacts
22:34
ThePrimeTime
Рет қаралды 96 М.
Homemade Professional Spy Trick To Unlock A Phone 🔍
00:55
Crafty Champions
Рет қаралды 56 МЛН
Is it Cake or Fake ? 🍰
00:53
A4
Рет қаралды 20 МЛН
The joker's house has been invaded by a pseudo-human#joker #shorts
00:39
Untitled Joker
Рет қаралды 4,5 МЛН
My Initial Impresson Of Go
12:39
TheVimeagen
Рет қаралды 74 М.
Why We've Adopted Elixir
31:06
Pusher
Рет қаралды 45 М.
Intro to OTP in Elixir
31:01
Full Stack Talks
Рет қаралды 31 М.
Golang vs. Rust: Which is Better?
12:40
Code With Ryan
Рет қаралды 122 М.
Go Concurrency vs Elixir Concurrency - Elixir Melbourne Meetup
43:36
Elixir Melbourne
Рет қаралды 1,3 М.
The standard library now has all you need for advanced routing in Go.
13:52
Elixir: The Documentary
12:49
Honeypot
Рет қаралды 231 М.
После ввода кода - протирайте панель
0:18
🔥Идеальный чехол для iPhone! 📱 #apple #iphone
0:36
Не шарю!
Рет қаралды 1,3 МЛН
Какой ПК нужен для Escape From Tarkov?
0:48
CompShop Shorts
Рет қаралды 269 М.
Игровой Комп с Авито за 4500р
1:00
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 163 М.
iPhone 12 socket cleaning #fixit
0:30
Tamar DB (mt)
Рет қаралды 50 МЛН
Секретный смартфон Apple без камеры для работы на АЭС
0:22