Go (Golang) vs. Bun: Performance (Latency - Throughput - Saturation - Availability)

Поділитися
Вставка
  • Опубліковано 9 лют 2025

КОМЕНТАРІ • 347

  • @AntonPutra
    @AntonPutra  4 місяці тому +8

    🔴 To support my channel, I'd like to offer Mentorship/On-the-Job Support/Consulting (me@antonputra.com)

    • @ferdynandkiepski5026
      @ferdynandkiepski5026 4 місяці тому +1

      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.

    • @AGAU1022
      @AGAU1022 4 місяці тому +3

      Node vs Deno and/or Deno Fresh (real world test like Test 2 with Postgres or SQLite)

    • @AGAU1022
      @AGAU1022 4 місяці тому

      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)

    • @x31tr0n7
      @x31tr0n7 4 місяці тому +1

      A performance overview of kafka vs pulsar vs nats vs rabbitmq vs activemq would be really great.

    • @suriya_gm
      @suriya_gm 4 місяці тому +2

      FastAPI benchmark

  • @wisataakhirpekan
    @wisataakhirpekan 4 місяці тому +133

    This match is the most anticipated by some viewers.

    • @Serizon_
      @Serizon_ 4 місяці тому +3

      agreed

    • @PraiseYeezus
      @PraiseYeezus 4 місяці тому +2

      they're really fun but it also seems like people are taking the results way too seriously

    • @AntonPutra
      @AntonPutra  4 місяці тому +6

      😊

    • @orkhepaj
      @orkhepaj 4 місяці тому +1

      but why?

  • @austinraney
    @austinraney 4 місяці тому +112

    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.

    • @stxnw
      @stxnw 4 місяці тому +20

      Bun can use workers. I doubt the results would change much. Bun is written in Zig afterall.

    • @AntonPutra
      @AntonPutra  4 місяці тому +5

      thanks for the feedback

    • @austinraney
      @austinraney 4 місяці тому +5

      @@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!

    • @victor95pc
      @victor95pc 4 місяці тому +1

      Use PM2 and done you can use multiple CPUs with javascript, yeah it will eat more RAM, but RAM is cheap!

    • @larsolavgigstad6738
      @larsolavgigstad6738 4 місяці тому +11

      ​@@stxnw
      Yes, but your not using Bun to run Zig code. If your services are really small sure the impact of javascript would be small and you'll measure the Zig component. The more javascript code you have the bigger impact it has, since the amount of code is so small you are correct its measuring Zig and not Javascript.
      All these tests are so small where the actual handler code in Javascript is neglectable. For instance this test does not do any authentication, verification/validating, processing, transformation or enriching of data. No REST API in production is this simple. All it does is take a json struct and push it to a db, the whole handler is 30 lines of code with no middleware. You not measuring real a javascript api with that little code.

  • @hohohomeboy
    @hohohomeboy 4 місяці тому +9

    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.

    • @AntonPutra
      @AntonPutra  4 місяці тому +1

      thanks! i do my best

  • @ninjaasmoke
    @ninjaasmoke 4 місяці тому +44

    this series is really good!!

  • @Tom-mx1ec
    @Tom-mx1ec 4 місяці тому +18

    Дякую за такий корисний контент! Вже почав вчити Go ;)

  • @AGAU1022
    @AGAU1022 4 місяці тому +3

    Thanks for doing these, love them.

  • @Mentioum
    @Mentioum 4 місяці тому +24

    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'd 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.

    • @AntonPutra
      @AntonPutra  4 місяці тому +1

      thank you for the feedback, I'll play with json sometime in the future

    • @therealgamingmaniac
      @therealgamingmaniac 4 місяці тому +4

      Also Golang encoding/json is slow, use fast-json

    • @reneseses
      @reneseses 4 місяці тому +1

      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.

    • @gokulkrishnan7427
      @gokulkrishnan7427 4 місяці тому +1

      @@therealgamingmaniac Why fast-json is good in serialization than encoding/json ?

  • @ferdynandkiepski5026
    @ferdynandkiepski5026 4 місяці тому +80

    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.

    • @clicktolearnmore
      @clicktolearnmore 4 місяці тому +9

      There is also PGO (profile guided optimizations) in go and more agressive inlining optimizations to be enabled

    • @misalambasta
      @misalambasta 4 місяці тому +12

      Raise the PR

    • @severgun
      @severgun 4 місяці тому +10

      I can bet processing HTTP requests does not require vector extensions

    • @salamander_xing
      @salamander_xing 4 місяці тому +4

      ok but i bet you can also optimize Bun

    • @germandavid2520
      @germandavid2520 4 місяці тому +6

      Please raise a PR with the changes, Anton will merge your PR and make a new video if there is performance improvements.

  • @ootia
    @ootia 4 місяці тому +1

    Amazing work! Keep going!
    I thought second test will be with multi-cpu, but you made it even better.

    • @AntonPutra
      @AntonPutra  4 місяці тому +1

      i'll do a multithreaded test soon

  • @colin_actually
    @colin_actually 4 місяці тому +4

    Very interesting. Need a table summarizing where each solution's relative strengths and weaknesses are. Golang pretty good overall.

  • @pradimasyudha
    @pradimasyudha 4 місяці тому +5

    Great video. Hope you can make another video to compare between Bun with Elysia and Go with Fiber 👌

    • @AbegazNap
      @AbegazNap 4 місяці тому

      does elysia use a custom json parser?

  • @TsillALevi
    @TsillALevi 4 місяці тому +21

    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.

    • @AntonPutra
      @AntonPutra  4 місяці тому +9

      yes mysql 9.0.1 vs postgres 17.0.1 coming next

    • @jevve11er
      @jevve11er 4 місяці тому +2

      ​@@AntonPutra
      Don't forget MongoDB, RavenDB YugabyteDB, DuckDB with Go pls

  • @ErmandDurro
    @ErmandDurro 4 місяці тому +1

    Great video. I enjoyed it a lot and gave me some new perspectives. Thank you!

  • @lemna9138
    @lemna9138 4 місяці тому +15

    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

    • @AntonPutra
      @AntonPutra  4 місяці тому +1

      maybe you're right

    • @MelroyvandenBerg
      @MelroyvandenBerg 4 місяці тому +9

      @@AntonPutra testing is easy, creating a good test is hard.. Creating a fair test is even harder.

  • @erisboxxx
    @erisboxxx 4 місяці тому +1

    Love these

  • @ilyastrelov9868
    @ilyastrelov9868 4 місяці тому +2

    Thanks for doing such a wonderful work

  • @cheatoffchannel6320
    @cheatoffchannel6320 4 місяці тому +10

    Interesting results! Can you also compare Python’s FastAPI with something? It is pretty fast and should be on par with Java Spring.

  • @MelroyvandenBerg
    @MelroyvandenBerg 4 місяці тому +2

    Thanks for the Golang vs Bun !

  • @christianovergaard1081
    @christianovergaard1081 4 місяці тому +14

    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.

    • @martinhotmann7868
      @martinhotmann7868 4 місяці тому +5

      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.

    • @BosonCollider
      @BosonCollider 4 місяці тому +2

      @@martinhotmann7868 Stdlib router was more than good enough when the requests have to do actual work.

    • @severgun
      @severgun 4 місяці тому

      just check final values and compare them in your mind or google spreadsheet. You can compare 3 values without youtube video

    • @AntonPutra
      @AntonPutra  4 місяці тому +5

      yes, I will do that as soon as I standardize the tests and optimize the infrastructure

    • @katungiyassin9947
      @katungiyassin9947 4 місяці тому

      @@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?

  • @claudiobordoni8275
    @claudiobordoni8275 2 місяці тому +1

    It would be great if you set tooltip to display all in descending order. Nice tests. Great job

  • @amiteshgupta8404
    @amiteshgupta8404 4 місяці тому +1

    Thanks for such a good comparison video.

  • @tghpereira
    @tghpereira 4 місяці тому +3

    A comparison between go and c++ would be interesting

  • @Matty0187
    @Matty0187 4 місяці тому

    I've done extensive analysis like this internally. The optimal amount of cores is six and if you follow rectangular scaling, you'd want to have six instances also. There was a primagen discussion how this test needs to leverage multiple cores to be taken seriously. I can't give you the white paper, but I can assure you six cores is the optimal core count for golang and NodeJS

  • @easy-draw
    @easy-draw 4 місяці тому +2

    Impressive. Bun is just under year old and competing NBA league, lets wait little while and see what happens!

  • @iferca
    @iferca 4 місяці тому

    Anton, Deno 2 just released. I'd love to see Deno vs Node.JS, Go and Rust. :) Your videos are saving us tons on time in testing and helping to win lots and lots of arguments :) Thanks! Keep bringing them!

    • @AntonPutra
      @AntonPutra  4 місяці тому +1

      yes coming in about a week

  • @prerit714
    @prerit714 4 місяці тому +4

    HI Anton! Love your videos, can you do a bun vs deno2 comparison as well? I really want to see how will they behave since internally its just zig vs rust

    • @AntonPutra
      @AntonPutra  4 місяці тому +1

      yes coming in about a week

    • @chiebidoluchinaemerem5860
      @chiebidoluchinaemerem5860 3 місяці тому

      would really love to see how deno 2 plays along

    • @grxgvr4987
      @grxgvr4987 3 місяці тому

      More like zig + jscore vs rust + v8. In addition, uWebSockets written in c++ acts as a server, so I think zig is more of a glue.

  • @diosupremo4928
    @diosupremo4928 4 місяці тому +25

    What I learn with this channel: If you need to build a performant web server use Go

    • @Александр-ф9в4ю
      @Александр-ф9в4ю 4 місяці тому +7

      Yes, you use Rust

    • @artemxyi
      @artemxyi 4 місяці тому +2

      ​@@Александр-ф9в4юyou should use, учите инглиш

    • @AntonPutra
      @AntonPutra  4 місяці тому +2

      rust is also an option

    • @cesarmartinez2207
      @cesarmartinez2207 4 місяці тому +6

      ​​@@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

    • @Александр-ф9в4ю
      @Александр-ф9в4ю 4 місяці тому +1

      ​@@cesarmartinez2207 I understand you. Rust is very hard, especially for people bad at programming in general... 😢

  • @BeeBeeEight
    @BeeBeeEight 4 місяці тому +3

    Thank u, this was a very informative and frankly, quite entertaining video even though there is no animation or music at all. I think honestly, that Go as a GCPL has performed really admirably against Zig (a low level non GCPL). The tradeoff between performance (Zig) and memory safety (Go) is not easy to make. For this comparison please assume crabs 🦀 don't exist 😂

    • @C4CH3S
      @C4CH3S 4 місяці тому

      This test is really biased towards bun by using a single thread.

    • @AntonPutra
      @AntonPutra  4 місяці тому +1

      my pleasure

  • @공석원-v9b
    @공석원-v9b 4 місяці тому +24

    elixir vs golang 🎉

    • @AntonPutra
      @AntonPutra  4 місяці тому +4

      i remember 😊

    • @Mentioum
      @Mentioum 4 місяці тому +3

      @@공석원-v9b elixir will be *much* slower. Benefits of elixir are it's developer ergonomics.

    • @katungiyassin9947
      @katungiyassin9947 4 місяці тому +2

      @@Mentioum And Elixir is not good with memory, it just drinks memory like water

    • @roccociccone597
      @roccociccone597 4 місяці тому

      yes that is one I am actually interested in.

    • @MrAverageViewer
      @MrAverageViewer 4 місяці тому

      @@katungiyassin9947
      Explain how it "drinks" memory.

  • @danielnascimento4577
    @danielnascimento4577 4 місяці тому

    This kind of video is awesome!! Tks for This.

  • @bravodecodigo
    @bravodecodigo 4 місяці тому +2

    Craaazy results! What about Bun vs Deno 2.0?

    • @prerit714
      @prerit714 4 місяці тому

      THIS. I really really want to know the benchmarks LOL

    • @AntonPutra
      @AntonPutra  4 місяці тому

      coming in about a week

  • @edgonn
    @edgonn 4 місяці тому +6

    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.

    • @AntonPutra
      @AntonPutra  4 місяці тому +4

      What do you mean by use goroutine in this context? Can you give me an example or PR?

    • @roccociccone597
      @roccociccone597 4 місяці тому +1

      the HTTP libraries use goroutines by default. He could use fiber I guess and some compilation optimisations, but I don't see how that is related to "using goroutines"

  • @yaminokaze4475
    @yaminokaze4475 4 місяці тому +15

    So when doing any real work go is better?

  • @elvispalace
    @elvispalace 4 місяці тому +3

    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

    • @AntonPutra
      @AntonPutra  4 місяці тому

      ok thanks, i'll test it when available

    • @roccociccone597
      @roccociccone597 4 місяці тому

      Before JS can be sensibly compiled it needs types. Static Hermes uses type annotations for compiler optimisations. I don't know how concurrency and parallelism would work with JS with an AOT solution. It would require some stdlib from hermes to make that work, since that is something which is handled by the js engine. The lenghts people go to, to keep using JS is mind blowing.

  • @GabrielPozo
    @GabrielPozo 4 місяці тому

    Great video!!! 👏👏👏

  • @reze_dev
    @reze_dev 4 місяці тому +2

    Ayo, Deno 2 just dropped. Could you make compiled deno typescript vs go?

    • @AntonPutra
      @AntonPutra  4 місяці тому

      yes coming in about a week

  • @ArseniiBaibakov
    @ArseniiBaibakov 4 місяці тому +2

    Good time of the day!
    Please check your code again, deteriorated go performance is most likely caused by the fact that you forgot to Body.Close()
    Otherwise great benchmark, would love to check out the fixed version

    • @AntonPutra
      @AntonPutra  4 місяці тому

      please take a look. if you think i made a mistake somewhere, let me know or just create a PR from the github ui - github.com/antonputra/tutorials/blob/main/lessons/213/go-app/main.go.

  • @andreujuanc
    @andreujuanc 4 місяці тому +1

    Oh wow, WTF! UNEXPECTED!!!!

    • @AntonPutra
      @AntonPutra  4 місяці тому +1

      i expected this after i ran Bun vs Node.js 😊

  • @UndiedGamer
    @UndiedGamer 3 місяці тому +1

    you might need to run this benchmark again, bun 1.1.34 changed memory usage 👀

  • @_neuromanser_
    @_neuromanser_ 4 місяці тому +2

    Bun isn't bad at all!

    • @AntonPutra
      @AntonPutra  4 місяці тому +1

      to run static routes

  • @AchwaqKhalid
    @AchwaqKhalid 4 місяці тому +1

    Go was so limited in this test. Looking forward to tge multi cpu/thread test 💡

    • @AntonPutra
      @AntonPutra  4 місяці тому

      well, i use m7a.large instances for all my application tests. in this video, i used 2 golang instances, in the last video, i used 1 go instance with 2 CPUs, and the maximum RPS was almost the same. not sure about latency.

    • @mavyfaby
      @mavyfaby Місяць тому

      bun will still be fast on multithreadng with clusters

  • @conundrum2u
    @conundrum2u 4 місяці тому +7

    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

  • @kinsyu4907
    @kinsyu4907 4 місяці тому +1

    I'd love to see a test of Rust vs Bun

  • @codetin
    @codetin 3 місяці тому

    excellent works!
    I like all serials like this.
    will it be python framework like fastapi or flask benchmark with others.

  • @GolderiQ
    @GolderiQ 4 місяці тому +2

    Please Deno2 vs Bun or Deno2 vs Golang. Please don’t forget to use the new "Deno serve" syntax with the `deno serve -parallel` command, it behave like go! No need to create several instances, it takes all available without configuration except to `export default` a "fetch" key that hold a function looking like `handler(Request): Response`

    • @AntonPutra
      @AntonPutra  4 місяці тому +1

      ok! will do in about a week

  • @kal.leroux
    @kal.leroux 4 місяці тому +3

    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

    • @AntonPutra
      @AntonPutra  4 місяці тому +1

      I'll test it, but I use 2 instances to match Bun's setup, since it runs on a single thread

    • @kal.leroux
      @kal.leroux 4 місяці тому

      @@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

  • @ahmedsat4780
    @ahmedsat4780 4 місяці тому +1

    great videos 💯💯

  • @ruannawe6157
    @ruannawe6157 4 місяці тому

    Nice vídeo! Do you have some documentation how to deploy the benchmarks that you do in your vídeos?

  • @nexovec
    @nexovec 4 місяці тому +1

    The fact you can do 100KRPS on 2 js boxes is sort of mind-boggling to me.
    Well, to not exploit the heck out of this comparison, do benchmark bun vs go fiber in multi-threaded VMs. Possibly with in-memory caching(use otter in go), just to make the comparison land the point home.

    • @AntonPutra
      @AntonPutra  4 місяці тому +1

      thanks, i'll try gnet as well

  • @7heMech
    @7heMech 4 місяці тому +2

    You could do a multi cpu test with workers

  • @ebuzertahakanat
    @ebuzertahakanat 4 місяці тому +1

    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.

  • @toTheMuh
    @toTheMuh 4 місяці тому +1

    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.

    • @skuwamy
      @skuwamy 4 місяці тому

      imagine using javascript in backend hahahahahahah

    • @AntonPutra
      @AntonPutra  4 місяці тому

      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

    • @tobi-b
      @tobi-b 3 місяці тому

      But why not just go for that part as well?
      The only reason to use bun over go is if your team is efficient in javascript

  • @uptownhr
    @uptownhr 4 місяці тому

    Did not expect this. How about a deno vs bun?

  • @marufhasan3782
    @marufhasan3782 4 місяці тому +4

    We need springboot with virtual threads vs go.

    • @AntonPutra
      @AntonPutra  4 місяці тому

      i remember 😊

    • @svrd-tech
      @svrd-tech 4 місяці тому

      ​@@AntonPutra Spring boot app with virtual threads, webflux and compiled with graalvm :)

  • @RP-Rentner
    @RP-Rentner 4 місяці тому +2

    "GoLang is the better alternative" Did they say in 2019
    "The performance is much better than JavaScript" Did they say in 2019
    Here take this 🖕

  • @danielelatocca
    @danielelatocca 4 місяці тому +1

    We need a benchmark between c++ and go ❤🙂

  • @michaelell389
    @michaelell389 3 місяці тому

    Can you share your grafana dashboard json for this, I don't see it with the lesson. I'm attempting to replicate on a slightly more complex application and I'd like to compare in the same way.

  • @Kimo.Codess
    @Kimo.Codess 4 місяці тому +1

    Can I run these benchmarks locally in minikube? Is there any guide available?

    • @AntonPutra
      @AntonPutra  4 місяці тому

      you can, and i have the source code for each video in the description. just search how to install minikube on your computer; it's usually very easy with a package manager.

    • @Kimo.Codess
      @Kimo.Codess 3 місяці тому

      @@AntonPutra I already have minikube installed but I got stuck on how to deploy the servers and clients

  • @tqwewe
    @tqwewe 4 місяці тому

    I'm trying to run your benchmarks myself by deploying AWS EKS cluster, however I'm not experienced with AWS or how to setup the monitoring. The furthest I got was just building the app images and uploading them to a repository. Is there any tutorial where you walk through running one of your benchmarks on AWS with Grafana?

    • @AntonPutra
      @AntonPutra  4 місяці тому

      yes, i have a few on my channel. just search for prometheus, but be very careful with aws.

  • @yedidyarashi
    @yedidyarashi 4 місяці тому +1

    I see that you using aputra/load-tester:v18 to run the tests where can I find the docker file for it?

    • @AntonPutra
      @AntonPutra  4 місяці тому +1

      i need to refactor it before i can release it, it's just a rust client with prometheus metrics

    • @yedidyarashi
      @yedidyarashi 4 місяці тому

      @@AntonPutra awaiting for your update

  • @marcosAmaranteC
    @marcosAmaranteC 4 місяці тому +1

    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

    • @nguyennguyenkhang5800
      @nguyennguyenkhang5800 4 місяці тому +4

      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.

    • @khawarizmyana
      @khawarizmyana 4 місяці тому +2

      Sqlc

    • @mad_t
      @mad_t 4 місяці тому

      gorm is good for read tasks
      I use gorm to read and pgxpool to insert/update/delete

    • @AntonPutra
      @AntonPutra  4 місяці тому

      🧐

  • @truongan354
    @truongan354 4 місяці тому +2

    Again with sqlite please

    • @AntonPutra
      @AntonPutra  4 місяці тому

      sqlite is used only for development, it is not a real database

    • @truongan354
      @truongan354 4 місяці тому +3

      @@AntonPutra I use sqlite for huge data of farms. It is very fast

  • @darkcheese1
    @darkcheese1 4 місяці тому +1

    what instances do you use on AWS?

    • @AntonPutra
      @AntonPutra  4 місяці тому +1

      m7a.large for applications and m7g.4xlarge for clients

    • @AntonPutra
      @AntonPutra  4 місяці тому

      ok noted!

  • @salim444
    @salim444 4 місяці тому +1

    Can you please do Clojure (reitit) vs go? the bun vs go was unexpected but that is why testing is crucial

  • @zedd7682
    @zedd7682 4 місяці тому

    i think a benchmark returning html instead json (htmx) could be cool too

    • @AntonPutra
      @AntonPutra  4 місяці тому +2

      i'll get to UI soon, like react and angular, but I don't really see the benefit of testing server-side rendering

  • @ИнтернетСпасётМир
    @ИнтернетСпасётМир 4 місяці тому

    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?

    • @AntonPutra
      @AntonPutra  4 місяці тому +1

      best case $10, worst case $50 and if you forget to tear down after test $200 😊

    • @ИнтернетСпасётМир
      @ИнтернетСпасётМир 4 місяці тому

      @@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.

  • @giorgio5127
    @giorgio5127 4 місяці тому +2

    I am curious about Swift 6 with hammingbird 2

  • @Justsomeguy492
    @Justsomeguy492 4 місяці тому +3

    please benchmark spring boot with virtual threads

    • @AntonPutra
      @AntonPutra  4 місяці тому

      I'll work on Java in a bit

  • @szymmarcinkowski
    @szymmarcinkowski 4 місяці тому +1

    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.

    • @AntonPutra
      @AntonPutra  4 місяці тому

      i do my best to cover some real-world use cases, but you're right, they are too simple

  • @mridu299
    @mridu299 4 місяці тому

    Request for two new items. First explaining these metrics and second fastapi vs go really want to see how the results will be.

    • @AntonPutra
      @AntonPutra  4 місяці тому

      ok got it, i'll do fastapi (python) soon

  • @RishabhBahukhandi
    @RishabhBahukhandi 4 місяці тому +1

    I wonder how good nextjs APIs are as compared to a proper server using express

  • @denisuardi3979
    @denisuardi3979 4 місяці тому

    please do go vs php, because i wanna explain to my company about how good golang

  • @TheOchita
    @TheOchita 4 місяці тому +1

    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.

    • @AntonPutra
      @AntonPutra  4 місяці тому +1

      I guess, but many benchmarks use static tests, which is why I include them

  • @SR-ti6jj
    @SR-ti6jj 4 місяці тому

    What do you make of the very last graph (CPU throttling)? Seems like Bun dipped below Go near the end of the test

    • @AntonPutra
      @AntonPutra  4 місяці тому

      Not sure, I need to investigate, but it does correlate with high latency

  • @alissonprimo
    @alissonprimo 4 місяці тому +12

    Elixir vs All the others

    • @-foxy1859
      @-foxy1859 4 місяці тому +6

      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

    • @infantfrontender6131
      @infantfrontender6131 4 місяці тому

      @@-foxy1859, you can use Rustler or Elixir NX for better performance, but it's too much. BEAM is about scale, concurrency, and fault tolerance

    • @AntonPutra
      @AntonPutra  4 місяці тому +2

      will do Elixir afte database benchmark

  • @robcannon
    @robcannon 4 місяці тому

    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.

    • @AntonPutra
      @AntonPutra  4 місяці тому

      i'll wait. also, deno v2 is not officially out yet either

  • @boot-strapper
    @boot-strapper 4 місяці тому +1

    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

    • @AntonPutra
      @AntonPutra  4 місяці тому

      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-strapper
      @boot-strapper 4 місяці тому +3

      @@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

  • @katungiyassin9947
    @katungiyassin9947 4 місяці тому

    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?

  • @randomtechclipper
    @randomtechclipper 4 місяці тому +1

    I'd love to see how that MongoDb server was performing during all this 😂

  • @avayema
    @avayema 4 місяці тому +1

    Please compare Fiber vs Bun

    • @AntonPutra
      @AntonPutra  4 місяці тому +1

      i'll do it but probably later

    • @maxpain177
      @maxpain177 3 місяці тому

      @@AntonPutra When?

  • @not_yet_implemented
    @not_yet_implemented 4 місяці тому +3

    C++ vs rust?

    • @AntonPutra
      @AntonPutra  4 місяці тому +1

      i'll get to c++ soon

  • @hughesabsalom526
    @hughesabsalom526 4 місяці тому +1

    Lesson learnt, no company runs on static data 😅😅

  • @winfredj9820
    @winfredj9820 Місяць тому +1

    go getting destroyed by interpreted language 🤣🤣

  • @therceman
    @therceman 4 місяці тому +3

    Deno 2 vs go 😀
    Or Bun with framework vs go Lang framework

    • @yume6643
      @yume6643 4 місяці тому

      what framework ? There is no use of a framework in go

    • @therceman
      @therceman 4 місяці тому

      @@yume6643 are you sure about that? 😀

    • @AntonPutra
      @AntonPutra  4 місяці тому +1

      waiting for the official release of v2, so far, Deno only has a release candidate

    • @yume6643
      @yume6643 4 місяці тому

      @@therceman well, give me one reason to use a framework over the stdlib?

  • @victormadu1635
    @victormadu1635 4 місяці тому +1

    Pls can you do database performance benchmarking

  • @nacs
    @nacs 3 місяці тому

    Could you do Deno 2 vs golang please?

  • @0xd3c0d3d
    @0xd3c0d3d 4 місяці тому

    Zig shining through the BUN 😁

  • @ThomasValadez-tv
    @ThomasValadez-tv 3 місяці тому

    I would love to see a nodejs vs python. or a hono vs django 🙏

  • @settiricardo
    @settiricardo 4 місяці тому +1

    that's unexpected,

    • @AntonPutra
      @AntonPutra  4 місяці тому

      i expected this after i ran Bun vs Node.js 😊

  • @farhadeviltrg6116
    @farhadeviltrg6116 4 місяці тому +4

    Good content 👌
    Do fastapi vs go too

    • @AntonPutra
      @AntonPutra  4 місяці тому +1

      thanks! i'll do python fastapi soon

  • @jeikovsegovia
    @jeikovsegovia 3 місяці тому

    Include deno 2.0 Please

  • @abinesh-devadas
    @abinesh-devadas 4 місяці тому

    Can you do java (springboot) vs node (nestjs)

  • @dtesta
    @dtesta 4 місяці тому

    You should probably have chosen sqlite3 instead, as Bun is optimised for it.

  • @muratkoptur
    @muratkoptur 4 місяці тому

    5:39 isn't there "availability" graph inconsistency?

  • @ibrahimnalbant7635
    @ibrahimnalbant7635 4 місяці тому +1

    can you do python vs bun vs node?

    • @AntonPutra
      @AntonPutra  4 місяці тому

      i'll do python soon (faastapi)

  • @biLLie_wiLLie
    @biLLie_wiLLie 4 місяці тому +1

    Do you really know all programming languages and tools?

    • @mad_t
      @mad_t 4 місяці тому +1

      I don't think so. That's why he gives a repo link so ppl can make PRs if they want to optimize something

    • @AntonPutra
      @AntonPutra  4 місяці тому

      I can handle basic tasks in most languages, but I heavily rely on expert advice and optimizations to improve performance

  • @katungiyassin9947
    @katungiyassin9947 4 місяці тому

    If Bun has managed to be this good, I think now you see where Zig is going. Soon Zig is coming for your Rust....

  • @vahan6500
    @vahan6500 4 місяці тому

    You concentrated on single weakness of go and push it . Add more code and add threads …

  • @archyt88
    @archyt88 4 місяці тому

    Give it a try to python sanic, it is really fast