► What should I test next? ► AWS is expensive - Infra Support Fund: buymeacoffee.com/antonputra ► Benchmarks: kzbin.info/aero/PLiMWaCMwGJXmcDLvMQeORJ-j_jayKaLVn&si=p-UOaVM_6_SFx52H
@ferdynandkiepski50262 күн бұрын
When are we getting a comparison with C/C++? I would most like to see C++ vs Rust vs Go, as these are the options for high performance.
@AGAU10222 күн бұрын
Node vs Deno and/or Deno Fresh (real world test like Test 2 with Postgres or SQLite)
@AGAU10222 күн бұрын
I'd also like to see Test 2 for: single thread vs multi thread Bun the winner of Node vs Deno vs Go Axum vs Zig std library vs Go vs Loco F# (giraffe) vs C# (minimal API) Python (blacksheep) vs Lua (openresty) Julia (std lib) vs Julia (oxygen) vs Julia (jewlia)
@x31tr0n72 күн бұрын
A performance overview of kafka vs pulsar vs nats vs rabbitmq vs activemq would be really great.
@suriyaprakashg70072 күн бұрын
FastAPI benchmark
@wisataakhirpekan2 күн бұрын
This match is the most anticipated by some viewers.
@Serizon_2 күн бұрын
agreed
@PraiseYeezus2 күн бұрын
they're really fun but it also seems like people are taking the results way too seriously
@AntonPutra2 күн бұрын
😊
@Tom-mx1ec2 күн бұрын
Дякую за такий корисний контент! Вже почав вчити Go ;)
@AntonPutra2 күн бұрын
my pleasure 😊
@ninjaasmoke2 күн бұрын
this series is really good!!
@AntonPutra2 күн бұрын
thank you!
@ferdynandkiepski50262 күн бұрын
You are possibly missing optimizations with GO. You don't define a value for GOAMD64, which will default to v1. Apparently if the host has higher capability then it can generate assembly with other extensions, but I wouldn't rely on the compiler doing that. Go wiki->minimum requirements->microarchitecture describes the possible values for x86_64. On M7a, it looks like you have access to avx512, which means you could set GOAMD64=v4. Similar flags exist for other architectures. This could also reduce code size, as it would mean the compiler won't be relying on dynamic dispatch to generate the faster codepaths while leaving a compatibility version behind, which wastes space and is slower.
@howemeet2 күн бұрын
There is also PGO (profile guided optimizations) in go and more agressive inlining optimizations to be enabled
@misalambasta2 күн бұрын
Raise the PR
@severgun2 күн бұрын
I can bet processing HTTP requests does not require vector extensions
@salamander_xing2 күн бұрын
ok but i bet you can also optimize Bun
@germandavid25202 күн бұрын
Please raise a PR with the changes, Anton will merge your PR and make a new video if there is performance improvements.
@hohohomeboy2 күн бұрын
Thank you for your videos! I really like to watch, because the setup is very consistent and you make good distinctions, like in this video with the “synthetic” setup and a more real word setup.
@AntonPutra2 күн бұрын
thanks! i do my best
@AGAU1022Күн бұрын
Thanks for doing these, love them.
@공석원-v9b2 күн бұрын
elixir vs golang 🎉
@AntonPutra2 күн бұрын
i remember 😊
@Mentioum2 күн бұрын
@@공석원-v9b elixir will be *much* slower. Benefits of elixir are it's developer ergonomics.
@katungiyassin9947Күн бұрын
@@Mentioum And Elixir is not good with memory, it just drinks memory like water
@austinraney2 күн бұрын
This result isn’t overly surprising. Bun is architected for environments where applications are running on a single CPU. Go is architected for running in environments with multiple CPUs. Constraining the tests to a single CPU is playing into buns court. The go runtime runs a separate cpu thread for network related syscalls. Other goroutines (each handler would get its own goroutine) could be running on one or more other cpu threads (goroutines are multiplexed onto the cpu threads by go’s runtime). The cost of switching between threads over a single cpu will be high and reduce performance.
@stxnw2 күн бұрын
Bun can use workers. I doubt the results would change much. Bun is written in Zig afterall.
@AntonPutra2 күн бұрын
thanks for the feedback
@austinraneyКүн бұрын
@@stxnw yeah i’d be interested to see the results. For the first test, I would expect go to perform a bit better than it did in this sample as json marshaling shouldn’t contend as much with the thread conducting async network operations. But, I am a fool when it comes to the bun internals, so you are likely right!
@Mentioum2 күн бұрын
It's worth noting that in Golang, if you're optimizing for a scenario where you want to do this kind of test, you'd definitely not use the default json/marshal to return JSON, you're use string substitution / a template system. JSON marshalling is *extremely* cpu and memory intensive relatively speaking to something like quicktemplate. I havent benchmarked it for a long time, but from memory it was something like 10x better. If you know the structure of your json object and can build it with fasttemplate (almost always can) then you can save a *huge* amount of CPU usage, and increase application throughput. Great video though, the ¬40% CPU utilisation's effect on Go was fascinating and so easily avoidable with autoscaling. Incredibly interesting. I'll be adjusting my autoscaling triggers from 60% to 40% based on this.
@AntonPutra2 күн бұрын
thank you for the feedback, I'll play with json sometime in the future
@therealgamingmaniac2 күн бұрын
Also Golang encoding/json is slow, use fast-json
@reneseses22 сағат бұрын
Sonic is the fastest JSON library that I have tested and does not require making significant changes to the code. Also the project is active.
@gokulkrishnan742718 сағат бұрын
@@therealgamingmaniac Why fast-json is good in serialization than encoding/json ?
@DimasYudhaPratama-w4c18 сағат бұрын
Great video. Hope you can make another video to compare between Bun with Elysia and Go with Fiber 👌
@AbegazNap9 сағат бұрын
does elysia use a custom json parser?
@ilyastrelov98682 күн бұрын
Thanks for doing such a wonderful work
@AntonPutra2 күн бұрын
my pleasure, it's fun
@christianovergaard10812 күн бұрын
I think it would be nice if you did like a bigger benchmark once in a while to collect all your tests. So best rust, vs best go, vs django/fastapi (lol), etc.
@martinhotmann78682 күн бұрын
ABSOLUTELY!!! :) Also he should take not stdlib from golang, since it just is not so performant as fiber etc! And: more cores ... really today cores are cheap and people that would care about such type of performance, at least run on 4 cores. Single core is just not realistic today anymore.
@BosonCollider2 күн бұрын
@@martinhotmann7868 Stdlib router was more than good enough when the requests have to do actual work.
@severgun2 күн бұрын
just check final values and compare them in your mind or google spreadsheet. You can compare 3 values without youtube video
@AntonPutra2 күн бұрын
yes, I will do that as soon as I standardize the tests and optimize the infrastructure
@katungiyassin9947Күн бұрын
@@christianovergaard1081 I like to see Erlang go against Rust, because Erlang's BEAM is hyped for it's concurrency. Don't you think that will be worth being the benchmark of the Century?
@lemna91382 күн бұрын
Probably what is happening is that the bun.serve({static: {...}}) only interprets the js object once while the dynamic tests must run javascript every single request. I guess bun.serve static is a very convenient api for their static zig server
@AntonPutra2 күн бұрын
maybe you're right
@MelroyvandenBerg2 күн бұрын
@@AntonPutra testing is easy, creating a good test is hard.. Creating a fair test is even harder.
@diosupremo49282 күн бұрын
What I learn with this channel: If you need to build a performant web server use Go
@Александр-ф9в4ю2 күн бұрын
Yes, you use Rust
@artemxyi2 күн бұрын
@@Александр-ф9в4юyou should use, учите инглиш
@AntonPutra2 күн бұрын
rust is also an option
@LuarVik-x1l2 күн бұрын
@@artemxyi Все зрители данного видео, так же как и его автор, оказались русскими, скрывающими свое происхождение.
@cesarmartinez22072 күн бұрын
@@AntonPutra True, but the learning curve between rust and go it's insane, even you needed a second video with rust to optimize to beat go but with go on the other hand, you can get things done fast and easy
@TsillALevi2 күн бұрын
After went through so much compare between programing language. What do you think about making a video compare between database especially recently PostgreSQL 17 release and MySQL have major update to version 9. Thks.
@AntonPutra2 күн бұрын
yes mysql 9.0.1 vs postgres 17.0.1 coming next
@jevve11er2 күн бұрын
@@AntonPutra Don't forget MongoDB, RavenDB YugabyteDB, DuckDB with Go pls
@MelroyvandenBerg2 күн бұрын
Thanks for the Golang vs Bun !
@AntonPutra2 күн бұрын
my pleasure, deno is coming soon as well
@user-ow8gw8nl6p18 сағат бұрын
🔥@@AntonPutra
@GabrielPozo2 күн бұрын
Great video!!! 👏👏👏
@tghpereiraКүн бұрын
A comparison between go and c++ would be interesting
@AntonPutraКүн бұрын
will do!
@conundrum2u2 күн бұрын
If you're serving static content you're really just going to use a CDN or service that is optimized for it. Scenario #2 is far more illustrative. When we're talking microseconds difference in latency, it's more likely that other network factors will mask it from the client's perspective so I think it's a non-issue. Good video
@AntonPutra2 күн бұрын
agreed
@danielnascimento45772 күн бұрын
This kind of video is awesome!! Tks for This.
@AntonPutra2 күн бұрын
thank you!
@amiteshgupta84042 күн бұрын
Thanks for such a good comparison video.
@AntonPutra2 күн бұрын
my pleasure
@colin_actuallyКүн бұрын
Very interesting. Need a table summarizing where each solution's relative strengths and weaknesses are. Golang pretty good overall.
@elvispalace2 күн бұрын
non-blocking I/O is great to handle request. but when you need to parse alot data, JS pushes the CPU, there is where GO shows it supremacy. maybe in the future, with a runtime using Static Hermes (a JS static compiler x10 times faster than actual engines), JS will be better in handle with this problem
@AntonPutra2 күн бұрын
ok thanks, i'll test it when available
@andreujuanc2 күн бұрын
Oh wow, WTF! UNEXPECTED!!!!
@AntonPutra2 күн бұрын
i expected this after i ran Bun vs Node.js 😊
@ahmedsat47802 күн бұрын
great videos 💯💯
@AntonPutra2 күн бұрын
thanks!
@edgonn2 күн бұрын
Bun already comes pre-configured with optimization features that were not used in Go. Use goroutine to get closer to what is already offered in Bun's standard architecture.
@AntonPutra2 күн бұрын
What do you mean by use goroutine in this context? Can you give me an example or PR?
@ruannawe615721 сағат бұрын
Nice vídeo! Do you have some documentation how to deploy the benchmarks that you do in your vídeos?
@farhadeviltrg61162 күн бұрын
Good content 👌 Do fastapi vs go too
@AntonPutra2 күн бұрын
thanks! i'll do python fastapi soon
@toTheMuh2 күн бұрын
Bun could be useful as a background worker. Imagine you have a go api which contains some functionalities with cpu heavy calculation that do not need to access a database. You could outsource that part of the your go api to a bun server which does the calculation and returns the result.
@skuwamy2 күн бұрын
imagine using javascript in backend hahahahahahah
@AntonPutra2 күн бұрын
i think if you're a frontend developer, you can probably find a use case for bun, just to keep your codebase in the same language
@Justsomeguy4922 күн бұрын
please benchmark spring boot with virtual threads
@AntonPutra2 күн бұрын
I'll work on Java in a bit
@uptownhr23 сағат бұрын
Did not expect this. How about a deno vs bun?
@marufhasan37822 күн бұрын
We need springboot with virtual threads vs go.
@AntonPutra2 күн бұрын
i remember 😊
@svrd-techКүн бұрын
@@AntonPutra Spring boot app with virtual threads, webflux and compiled with graalvm :)
@alissonprimo2 күн бұрын
Elixir vs All the others
@-foxy18592 күн бұрын
i think since Erlang type langs run in beam they will have worse performance. But they can scale at ease. Id also like to see benchmarks
@infantfrontender61312 күн бұрын
@@-foxy1859, you can use Rustler or Elixir NX for better performance, but it's too much. BEAM is about scale, concurrency, and fault tolerance
@AntonPutra2 күн бұрын
will do Elixir afte database benchmark
@avayemaКүн бұрын
Please compare Fiber vs Bun
@AntonPutraКүн бұрын
i'll do it but probably later
@SilasDuarte-e9k2 күн бұрын
Bun is basically Zig, so great performance is expected. But, Bun is a dependency and Go is a single binary without dependencies. So, it's basically Zig vs Go. And the two languages are great. Good comparison!
@commonfolk6632 күн бұрын
What does that even mean tho? Bun is bascially Zig the same way NodeJs is basically C++.
@AntonPutra2 күн бұрын
😊
@eightc33702 күн бұрын
It's clear you don't fully understand the difference among Javascript, Go and Zig. Saying Bun is 'basically Zig' and comparing it to Go really overlooks how programming languages work. Zig is a systems programming language with low-level memory management, while Bun is a JavaScript runtime built using Zig to optimize JS performance. Comparing Go and Zig doesn’t make sense because they solve very different problems-Go is designed for web services, concurrency, and backend development, while Zig focuses on systems-level control. These languages operate in entirely different ecosystems, so it’s not an apples-to-apples comparison.
@garretmhКүн бұрын
I think what the OP trying to say is that since bun's internals are implemented in Zig, in a simple test like the first one most of the executed code is Zig and not JavaScript.
@giorgio51272 күн бұрын
I am curious about Swift 6 with hammingbird 2
@AntonPutra2 күн бұрын
ok noted
@salim4442 күн бұрын
Can you please do Clojure (reitit) vs go? the bun vs go was unexpected but that is why testing is crucial
@AntonPutra2 күн бұрын
ok noted
@SkylearJ2 күн бұрын
Reading the comments on every video, I think people miss the point. If you have to take a bunch of extra steps to achieve max optimization, that is inherently a lesser experience than something that works fast and well out of the box. Just because Go has some esoteric optimizations you can use, doesn't mean everyone will know they even exist. Bun is therefore a better ootb experience.
@AntonPutra2 күн бұрын
well, if you're a frontend developer with javascript experience, it's much easier to maintain the codebase using the same language
@commonfolk6632 күн бұрын
@@AntonPutra you probably mean isomorphic codebase, frontenders could use types from Typescript backend directly, without having to rely on tools like Swagger to expose backend API. But TS-Node/Bun backend is much harder to learn than Golang even with frontend-js background, for anyone whos looking to develop simple but performant backend, Golang is a much better fit. Typescript is just outright better for business logic than Go on the other hand, fully capable of utilizing OOP and FP patterns, having higher level of control over threading, making it suitable for managing other services. I think biggest advantage Go has over Bun/Node isnt necessarily speed, but how easy it is not to mess up. In Go you can pretty much throw goroutines at anything and Go will automagically make sure it avoids blocking. In NodeJS/Bun on the other hand, its one of the biggest problems in community and backend development, as poor understanding of EventLoop and Worker-Threads leads to blocking and therefore insufferable performance JS is rumored for.
@assoriumКүн бұрын
It's not that isoteric, this is why backend is it's own thing. There are CPU architectures and other hardware to keep in mind. It is true though, that some languages and runtimes help optimizing but they cannot physically optimize code for every use case and hardware combinations. In the end all these comparisons are 10-20% useful, mostly showing how far actually hardware went ahead rather languages. Serving 20k dynamic request from a couple of nodes would be quite insane 10 years ago. And I'm not completely agree that knowing same language helps with DX, as language is just 1 step in the field of huge amount other knowledge required to maintain that end.
@RishabhBahukhandi2 күн бұрын
I wonder how good nextjs APIs are as compared to a proper server using express
@AntonPutra2 күн бұрын
i'll test next.js in the near future
@RishabhBahukhandi2 күн бұрын
@@AntonPutra thanks 👍🏼
@boot-strapper2 күн бұрын
unfortunately for tests like these its really hard to judge a language. For example, bun's built in sqlite is godly performance. Some of the drivers that bun is compatible with, are not really optimal for bun. I suspect thats the case with mongo driver here. Thanks again, nice work
@AntonPutra2 күн бұрын
well, sqlite is not for production, it’s just a local database for testing. i’ve already tested bun with postgres and mongo, and the results are the same so far
@boot-strapper2 күн бұрын
@@AntonPutra fair. I do think it will get better over time. But SQLite can be used for production actually, and there are even new tools around using distributed SQLite
@zedd76822 күн бұрын
i think a benchmark returning html instead json (htmx) could be cool too
@AntonPutra2 күн бұрын
i'll get to UI soon, like react and angular, but I don't really see the benefit of testing server-side rendering
@denisuardi3979Күн бұрын
please do go vs php, because i wanna explain to my company about how good golang
@robcannon2 күн бұрын
I would like to see Deno vs Bun. I would also like to see the C# vs Go again now that you are using Go stdlib. Although, maybe you should wait for .Net 9.0 since this being release next month.
@AntonPutra2 күн бұрын
i'll wait. also, deno v2 is not officially out yet either
@victormadu16352 күн бұрын
Pls can you do database performance benchmarking
@AntonPutra2 күн бұрын
yes coming next
@TheOchita2 күн бұрын
Isn't test1 just testing how good the buildin json lib is? My guess would be that the bun json is either being jitted to really good optimal code or it's using a c++ biding. On the good side it's well known that v1 isn't fast, which is why they are msking v2.
@AntonPutra2 күн бұрын
I guess, but many benchmarks use static tests, which is why I include them
@ebuzertahakanatКүн бұрын
would you re create go vs java benchmark please because as you know you didn't push them to the limit with the video that currently published.
@katungiyassin9947Күн бұрын
I like to see Erlang go against Rust, because Erlang's BEAM is hyped for it's concurrency. Don't you think that will be worth being the benchmark of the Century?
@mridu2992 күн бұрын
Request for two new items. First explaining these metrics and second fastapi vs go really want to see how the results will be.
@AntonPutra2 күн бұрын
ok got it, i'll do fastapi (python) soon
@hughesabsalom5262 күн бұрын
Lesson learnt, no company runs on static data 😅😅
@AntonPutra2 күн бұрын
💯
@szymmarcinkowski12 сағат бұрын
These benchmarks should not be taking too serious as that is still clearly too simple thus far from real life applications to provide real insights.
@therceman2 күн бұрын
Deno 2 vs go 😀 Or Bun with framework vs go Lang framework
@yume66432 күн бұрын
what framework ? There is no use of a framework in go
@therceman2 күн бұрын
@@yume6643 are you sure about that? 😀
@AntonPutra2 күн бұрын
waiting for the official release of v2, so far, Deno only has a release candidate
@yume6643Күн бұрын
@@therceman well, give me one reason to use a framework over the stdlib?
@timvw012 күн бұрын
C++ vs rust?
@AntonPutra2 күн бұрын
i'll get to c++ soon
@settiricardo2 күн бұрын
that's unexpected,
@AntonPutra2 күн бұрын
i expected this after i ran Bun vs Node.js 😊
@yaminokaze44752 күн бұрын
So when doing any real work go is better?
@AntonPutra2 күн бұрын
yes
@kal.leroux2 күн бұрын
I think it's better to have 1 instance with 2 core than 2 instances with 1 core for golang case or you can make a video about it
@AntonPutra2 күн бұрын
I'll test it, but I use 2 instances to match Bun's setup, since it runs on a single thread
@kal.leroux2 күн бұрын
@@AntonPutra I understand it's just that if golang perform better in multiple core env than multiple instance with single than your test would be a little bit misleading but I understand that we always use multiple instance when deploying app even in golang so I don't know, anyway I like your content and keep going
@dtestaКүн бұрын
You should probably have chosen sqlite3 instead, as Bun is optimised for it.
@sanchitwadehra2 күн бұрын
dhanyavad
@Serizon_2 күн бұрын
Lmao seeing a indian in the chat is good
@AntonPutra2 күн бұрын
my pleasure 😊
@0xd3c0d3dКүн бұрын
Zig shining through the BUN 😁
@truongan3542 күн бұрын
Again with sqlite please
@AntonPutra2 күн бұрын
sqlite is used only for development, it is not a real database
@truongan3542 күн бұрын
@@AntonPutra I use sqlite for huge data of farms. It is very fast
@abinesh-devadasКүн бұрын
Can you do java (springboot) vs node (nestjs)
@archyt88Күн бұрын
Give it a try to python sanic, it is really fast
@marcosAmaranteC2 күн бұрын
Guys, what do you think about GORM, for a long time I preferred to use pgx and write my queries manually, but I've been using gorm for a week on a small project and I'm really enjoying it. although it is very far from being a LINQ
@nguyennguyenkhang58002 күн бұрын
Meh, I found ORM really sucks if project grew up with a complex queries can make it slow overtime and try pretend your programming code is better than SQL. If you have time and you know SQL just dive in to SQL and write SQL procedure or function. It is easier for me to switch to other backend programming or write unit test in the future in case I don't like Go and switch to Rust. But that is just my personal opinion if I have to work with SQL.
@khawarizmyana2 күн бұрын
Sqlc
@mad_t2 күн бұрын
gorm is good for read tasks I use gorm to read and pgxpool to insert/update/delete
@AntonPutra2 күн бұрын
🧐
@ibrahimnalbant76352 күн бұрын
can you do python vs bun vs node?
@AntonPutra2 күн бұрын
i'll do python soon (faastapi)
@SamerLOLOfficial2 күн бұрын
Maybe next time use Honojs or Elysiajs for Bun, since it handle HTTP requests better.
@AntonPutra2 күн бұрын
thanks i'll get to Elysiajs soon
@katungiyassin9947Күн бұрын
If Bun has managed to be this good, I think now you see where Zig is going. Soon Zig is coming for your Rust....
@yedidyarashi2 күн бұрын
I see that you using aputra/load-tester:v18 to run the tests where can I find the docker file for it?
@AntonPutra2 күн бұрын
i need to refactor it before i can release it, it's just a rust client with prometheus metrics
@yedidyarashi2 күн бұрын
@@AntonPutra awaiting for your update
@chielonewctle7601Күн бұрын
hmm, that red-eyed jealous gopher...
@RandyRanderson4042 күн бұрын
Why is the gopher stoned in the thumbnail?
@AntonPutra2 күн бұрын
😂
@yume66432 күн бұрын
So basically, what does this benchmark shows us : unoptimized Golang nerfed to 1 core + pure go json lib is not far from a zig json implementation; "real world" nerfed golang is much better than bun. 2-0 for golang against zigscript. 😀
@AntonPutra2 күн бұрын
not sure what you mean by not optimized
@Dipj012 күн бұрын
That's a lot of cope
@yume6643Күн бұрын
@@AntonPutra did you compile it with pgo and optimization flags? Have you done a string format instead of the stdlib json which is known for low performances? Did you tune the gc ? Golang offers a lot of easy lower level optimization that doesn't need much work. 😊
@biLLie_wiLLie2 күн бұрын
Do you really know all programming languages and tools?
@mad_t2 күн бұрын
I don't think so. That's why he gives a repo link so ppl can make PRs if they want to optimize something
@AntonPutra2 күн бұрын
I can handle basic tasks in most languages, but I heavily rely on expert advice and optimizations to improve performance
@ИнтернетСпасётМир2 күн бұрын
I'm curious, how much does it approximately cost to run load benchmarks in large instances of AWS EKS for 2 applications with 2 replicas each for 2 hours?
@AntonPutra2 күн бұрын
best case $10, worst case $50 and if you forget to tear down after test $200 😊
@ИнтернетСпасётМирКүн бұрын
@@AntonPutra Am I correct in understanding that the cost of an experiment can only be known at the end of the month when the bill is issued, or is it possible to find out earlier on Amazon, for example, the next day? I think many subscribers, including myself, would be very interested if you made an overview video about the costs of your test runs that we see on the channel. This could be an idea for your new videos - evaluating the financial aspect of your launches on Amazon.
@crazycode25782 күн бұрын
I wanna tag Web dev cody here!!!!
@AntonPutra2 күн бұрын
😀
@mycode02 күн бұрын
Elixir vs go
@AntonPutra2 күн бұрын
Noted, I'll do it after the database test
@O...Maiden...O2 күн бұрын
bun & zig is just hype from ziguana, nothing more
@AntonPutra2 күн бұрын
maybe, but I got a few PRs with Zig optimizations, will see
@reinettetinekerr219Күн бұрын
I see no elixir
@SR-ti6jj2 күн бұрын
What do you make of the very last graph (CPU throttling)? Seems like Bun dipped below Go near the end of the test
@AntonPutra2 күн бұрын
Not sure, I need to investigate, but it does correlate with high latency
@lordxan12 күн бұрын
Bun vs rust (axum) next
@O...Maiden...O2 күн бұрын
great, but no chance for bun when compared to rust, similar to recent benchmark between rust (actix) and zig (zap)
@AntonPutra2 күн бұрын
bun can win in static tests, but if I add any dependency like a database or S3, it will fail
@toidihocdao-ux7ft2 күн бұрын
what aboout deno vs golang
@AntonPutra2 күн бұрын
waiting for the official release of v2, so far, Deno only has a release candidate
@martinhotmann78682 күн бұрын
Same as with node .. since node and bun are shit, we need to limit golang aswell - to make it "comparable", but the real world is: no one ever would do so. I really dislike it for multiple reasons: 1. golang performs bad with cpu limitations other than on a core base 2. golang is multicore - everytime you limit it to 1 core/thread, please also benchmark using 4 cores/threads etc.. other than this the viewer gets a limited picture. I understand, that other programming languages do not have good multi-core/parallelism implementations, but keep in mind, that you just wipe away golang biggest feature and then you compare it .. not fair!
@commonfolk6632 күн бұрын
Real world lol, what do you know about real world? These tests compare I/O bound HTTP servers, not arbitrary multi-core calculations. I/O bound servers have absolute priority on horizontal scaling, for geo/load distribution across clusters. Core-count is vertical scaling model. Go's biggest feature "in real world" is its simplicity, especially when it comes to throwing Goroutines at anything without 2nd thought. As soon as you have spare time and resources, there's little reason to tolerate GC, lack of control over concurrency, horrendous typing system, incapable of processing puny jsons without breaking a neck, all while its still far from fastest languages and with lacking ecosyst
@AntonPutra2 күн бұрын
thanks! i get your point. i'll do a separate benchmark with Node cluster mode and Go without that limit.
@eightc33702 күн бұрын
@@commonfolk663 You raise some solid points about benchmarking, but the video comparing Bun.js and Go in single-core tests actually reveals a deeper insight into both frameworks' real-world performance. Here's why Go is still in a different class for most backend systems: I/O-Bound Performance: While Bun.js performed impressively in handling static requests in the single-core test, it started struggling when real-world workloads, such as database interactions, were introduced. In these scenarios, Go’s Goroutines shine, providing lower latency and much more efficient CPU usage when handling requests that involve persistent storage (like MongoDB). Go’s multicore concurrency allows it to distribute tasks more efficiently across threads, which is crucial when scaling up systems in production. Latency vs. Throughput: The benchmark clearly shows that Go outperforms Bun.js in terms of latency up until the CPU reaches about 40% usage. For client-facing applications that prioritize low-latency, Go provides much faster response times under typical load. Bun.js may handle higher throughput at extreme loads, but as CPU usage increases, its single-threaded architecture causes latency to spike. Real-World Scenarios: The second test, which included MongoDB interactions, is where Go’s superiority becomes apparent. Go handled complex, real-world tasks-such as UUID generation and database inserts-far more efficiently than Bun.js. In real-world applications that require more than just static responses, Go’s ability to handle concurrency and persistent data operations is crucial. Kubernetes & CPU Throttling: Both Bun.js and Go experienced CPU throttling under heavy loads in Kubernetes, but Go’s performance degraded less drastically. This is important when designing systems that operate under consistent load in production. Go’s ability to handle such scenarios means it’s better suited for long-running, scalable backend services. Multicore Efficiency: While the benchmark limited both Bun.js and Go to single-core usage, Go’s multicore capabilities are where it truly excels. Unlike Bun.js or Node.js, which are limited to single-threaded event loops, Go can fully utilize multiple cores to execute tasks in parallel, giving it a significant advantage in systems that require true parallelism Bun.js certainly has its strengths for static or synthetic benchmarks, but Go’s power is undeniable when it comes to real-world scenarios like handling databases and processing concurrent I/O-heavy tasks. For high-performance backends, Go still stands as the better choice in terms of latency, concurrency, and scalability.
@eip4082 күн бұрын
holy
@AntonPutra2 күн бұрын
😊
@abiiranathan2 күн бұрын
Where is Jarred?
@AntonPutra2 күн бұрын
?
@RustIsWinningКүн бұрын
Baldie is in his office fixing segfaults.
@ebuzertahakanatКүн бұрын
also maybe it is just Bun's mongo driver sucks
@commonfolk6632 күн бұрын
Go backenders angry this time. What if people find out that backend server that takes 1 week to learn isnt worth paying salaries for. Fear not, you can always start learning OOP and FP to begin your programmer education.
@AntonPutra2 күн бұрын
😊
@hendrywilliamКүн бұрын
What language do you prefer then?
@commonfolk663Күн бұрын
@@hendrywilliamI'm an architect/manager in enterprise, I don't really think about it that way. Golang is wonderful for a lot of things, we do CLI and CI tools with it and backend for mvps, Golang is easiest to find middle+ developers for and I absolutely adore Nats, which is built on go. But id never propose Golang for backend of our projects if it has anywhere more than 2 developers on it. Golang is best for code that you never need to read and where you don't have any specific expectations for code, other than "just work". So for preferred language, it would depend on use-case, generally it's Rust/Java/Node for backend. Rust/C++ for high load. C++/Zig/Rust for system. Go/Python for CLI. Id say rust is universal right now. But it's too hard to find devs
@davidsiewert86492 күн бұрын
TLDR: Go uses 2x less memory and has 2x more RPS than Bun under the same hardware/kubernetes constrains
@AntonPutra2 күн бұрын
well for the 2nd test only
@davidsiewert86492 күн бұрын
The first test with only static data/responses seems overly synthetic and completely useless to me since I would use a CDN + S3 storage for static files instead.
@hamm89342 күн бұрын
Just say it: you made this video for all the js andys that dont wanna accept for some reason that there are better languages for the server, even languages with comparably easy syntax. Just say it lol.
@StingSting8442 күн бұрын
But the video is based on numbers??
@AntonPutra2 күн бұрын
i'm just a devops, people ask, and I test
@tanko.reactions1762 күн бұрын
with this one, all the fake devs (js guys) will feel justified and a reason for their existence. good for you for throwing them a piece of bread!
@EdwinMartin2 күн бұрын
Are go programmers really this childish?
@immer56802 күн бұрын
such an ignorant take, no need to be so insecure about your language of choice, it's just a piece of technology
@AntonPutra2 күн бұрын
i don't have any bias, I'm just a devops engineer who runs code in production
@skuwamy2 күн бұрын
I wonder what these JS Dev Kiddies will suggest to benchmark now haha
@sdprolearning2 күн бұрын
Ur mother
@AntonPutra2 күн бұрын
deno v2 😊
@LegendaryLLama-hz8db2 күн бұрын
and to think i use to take these videos as accurate. You are missing a bunch of optimizations in golang. cant take this seriously lol
@EdwinMartin2 күн бұрын
Anton specifically asks for test improvements, so you’re free to give it to him.
@AntonPutra2 күн бұрын
I got a lot of optimizations in the past for Go. If you have any advice, please share or, even better, create a PR.