Rust vs Zig vs Go Performance

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 พ.ย. 2024

ความคิดเห็น • 512

  • @AntonPutra
    @AntonPutra  หลายเดือนก่อน +13

    ► What should I test next?
    ► AWS is expensive - Infra Support Fund: buymeacoffee.com/antonputra
    ► Benchmarks: th-cam.com/play/PLiMWaCMwGJXmcDLvMQeORJ-j_jayKaLVn.html&si=p-UOaVM_6_SFx52H

    • @ferdynandkiepski5026
      @ferdynandkiepski5026 หลายเดือนก่อน +1

      C++ Zig Go. C++ using boost maybe.

    • @AlexanderMoon
      @AlexanderMoon หลายเดือนก่อน

      Deno2 vs Go/Python.

    • @Z3U5.0g
      @Z3U5.0g หลายเดือนก่อน

      Hey Prime reacted to your Bun vs Go video.

    • @AlexanderMoon
      @AlexanderMoon หลายเดือนก่อน +1

      Could you make a video on how to perform such benchmarks? Please

    • @yuskpa
      @yuskpa หลายเดือนก่อน +1

      Scala-ZIO-HTTP vs elixir-phoenix vs go

  • @_Aarius_
    @_Aarius_ หลายเดือนก่อน +55

    I am impressed by Zigs performance!

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +3

      finally 😊

  • @andresaguilar3055
    @andresaguilar3055 หลายเดือนก่อน +103

    It's amazing how fast you upload this quality content

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +1

      thanks!

  • @steveoc64
    @steveoc64 หลายเดือนก่อน +20

    ❤ Thank you so much Anton, you Champion
    You are doing a huge service to the industry here, and it’s much appreciated by a lot of people you have never met

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +1

      thank you! ❤

    • @metachain5345
      @metachain5345 23 วันที่ผ่านมา

      so just support hime to buy coffee

  • @arrow_function
    @arrow_function หลายเดือนก่อน +28

    Let's go with: rust vs c vs c++ vs zig
    Will be sooooooo interesting to see

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +5

      noted!

    • @asdasdasdxvxcv
      @asdasdasdxvxcv หลายเดือนก่อน +1

      ​@@AntonPutraYes please this is an actual test

    • @podakov
      @podakov 23 วันที่ผ่านมา

      I think zig and c will be the same in term if performance

    • @unarei
      @unarei 21 วันที่ผ่านมา

      @@podakov it depends on the framework being used

  • @gabrielborges8854
    @gabrielborges8854 หลายเดือนก่อน +11

    addict to this channel, plase dont stop to make videos

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +2

      🫡

  • @SofyanPujas
    @SofyanPujas วันที่ผ่านมา +1

    Your contents are becoming very good each day. Good job Anton!

  • @hughesabsalom526
    @hughesabsalom526 หลายเดือนก่อน +89

    Based on your previous tests i can say Go has been so consistent in terms of its performance and no one has ever raised suggestions to change your Go code to increase the performance. This shows how productive Go is

    • @baxiry.
      @baxiry. หลายเดือนก่อน +20

      Performance-optimized Go frameworks and libraries are well known. They perform similarly to Rust, but the video author avoids them.

    • @JosephMcMurray1984
      @JosephMcMurray1984 หลายเดือนก่อน +7

      @@baxiry. Which ones have you suggested to use that were avoided?

    • @SkylearJ
      @SkylearJ หลายเดือนก่อน +12

      @@baxiry. "avoids" them... yeah, he's followed many suggestions. I don't think writing your own HTTP responder in gnet is as user-friendly as stdlib or Gin. There's a limit to what "optimizations" make sense for this style of benchmark.

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +67

      i'll do the best go frameworks vs the best rust frameworks soon, including fiber and ntex

    • @rohithkumarbandari
      @rohithkumarbandari หลายเดือนก่อน +10

      @@baxiry. There is no way go would be as fast as rust

  • @cesarmartinez2207
    @cesarmartinez2207 หลายเดือนก่อน +121

    deno 2 is out, so if a deno vs bun would be interesting !

    • @huakun
      @huakun หลายเดือนก่อน +5

      Deno claims to be better than bun in many benchmarks

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +47

      coming in a week!

    • @GolderiQ
      @GolderiQ หลายเดือนก่อน

      @@cesarmartinez2207 yes Deno rocks! `deno serve -parallel` is a game changer for simplicity and performance!

    • @huakun
      @huakun หลายเดือนก่อน +1

      I am using deno to build a extension system as a runtime, works nice, feels safer with a sandbox

    • @GolderiQ
      @GolderiQ หลายเดือนก่อน

      @@huakun extension system for a browser?

  • @hertouthugues9084
    @hertouthugues9084 หลายเดือนก่อน +42

    I’m interested to see C# vs Java or C# vs Node :)
    Thanks for your job !

    • @lolilollolilol7773
      @lolilollolilol7773 หลายเดือนก่อน

      For Java, the vertx-web framework is by far the most interesting and most likely to get realistic use in production due to its maturity (there is also Redkale, but it's in chinese). In fact they outperform Actix.
      Node doesn't hold a candle to any of these frameworks in terms of performance. See Techempower benchmark for info.

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +2

      thanks! noted!

    • @metaltyphoon
      @metaltyphoon หลายเดือนก่อน

      @@AntonPutra plz use more at least 2 CPU and use .NET 9 as it comes out in Nov 12th (officially)

  • @piotrbielski9624
    @piotrbielski9624 หลายเดือนก่อน +43

    Peak performance JVM (after warm up Amazon Corretto) vs Go! That would be awesome!

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +8

      noted! i'll do java soon

    • @random-i2s
      @random-i2s หลายเดือนก่อน +6

      @@AntonPutra maybe good to add c# with dotnet core as well to that same test as its the same target audience as java and similar all-purpose ?

    • @belkocik
      @belkocik หลายเดือนก่อน

      @@random-i2s Indeed, good idea!

    • @NivedSuresh-e9h
      @NivedSuresh-e9h หลายเดือนก่อน

      @@AntonPutra this

    • @konstantinatwork3105
      @konstantinatwork3105 หลายเดือนก่อน +4

      @@AntonPutra Java Spring vs Quarkus vs Micronaut would be awesome!

  • @michaelutech4786
    @michaelutech4786 หลายเดือนก่อน +2

    I think this really is much more a comparison of frameworks than one of languages. It would be very interesting to see the system calls performed during such a benchmark to see what is actually responsible for the different performance characteristics. I would expect there to be very little computational load other than shuffling data back and forth and because of that, I would expect Zig to perform better and also improve more over time because it offers a tad more control over what's actually being done.
    What I find really amazing is that we spend a vast amount of time shuffling data with very little real processing of that data. Sometimes I wonder why we do that so much and so enthusiastically.

  • @CommanderRiker0
    @CommanderRiker0 หลายเดือนก่อน +7

    Zig is really impressive

  • @BeeBeeEight
    @BeeBeeEight หลายเดือนก่อน +17

    No unexpected surprises here. Given the odds Go has done very well against the non-GCPLs. I just find it surprising that Google didn't make Go the one language to rule all its stacks (Android, Chrome, ChromeOS, Flutter, Angular etc) when it's so surprisingly performant.

    • @MiguelVazquez90
      @MiguelVazquez90 หลายเดือนก่อน +5

      Angualr in Go would be awesome.

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +1

      well, i think there are already a lot of libraries written for each stack, and rewriting them in go would be time-consuming

    • @Marhaenism1930
      @Marhaenism1930 หลายเดือนก่อน +5

      rewriting flutter in go then ditching dart is good idea too ! 'flutter is future' after carbon lang was released after ten years then rewriting them all to carbon and so on

    • @ristekostadinov2820
      @ristekostadinov2820 หลายเดือนก่อน

      By Angular in Go you mean some kind of Go to js compiler right? because with wasm you will need to ship runtime to the client. Google did tried to 2nd repo of Angular with Dart but it never picked up steam + Google did it like an afterthought they never spent promoting it.

    • @BeeBeeEight
      @BeeBeeEight หลายเดือนก่อน

      @@ristekostadinov2820 either a Go to JS compiler or a full batteries web framework in Go where you still write frontend code in TS. I prefer the second one because I already know TS, I feel web devs should not avoid JS even though they may not like it, also an extra layer of compilation adds overhead time and Go's amazing speed should not be affected like that.
      As for Flutter-Go I'd imagine it to be much like RN, no need to learn Swift/Kotlin/C/C++ in depth. Flutter was supposed to target desktops too, but Dart is just not performant enough to write cross platform software.
      Btw, it seems there are also Go libraries that can compile Wasm modules.

  • @mubinmuhammad9713
    @mubinmuhammad9713 หลายเดือนก่อน +6

    Zig is just great!

  • @majesticonyx
    @majesticonyx หลายเดือนก่อน +46

    Zig really caught my attention.

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +14

      it's fast

    • @majesticonyx
      @majesticonyx หลายเดือนก่อน

      @@AntonPutra Is it as memory-safe as Rust?

    • @mrkcodes
      @mrkcodes หลายเดือนก่อน +21

      ​@@majesticonyx it has safety features but not as safe as rust. on the other hand it's less complex and verbose. so if you like the simplicity of go and the safety of rust, zig would be the middle ground.

    • @delphicdescant
      @delphicdescant หลายเดือนก่อน +15

      Even if it weren't as fast as it is, I'd still enjoy writing in Zig. It's a fun language that does a really good job of not overcomplicating things.
      I tried to like Rust. I'll keep trying, too.

    • @severgun
      @severgun หลายเดือนก่อน +2

      @@majesticonyx no. Just C with defer keyword.

  • @bjo004
    @bjo004 หลายเดือนก่อน +9

    zig is insane. Wow!!!😮

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      it is nice

  •  หลายเดือนก่อน +1

    I loved the video. Excellent work!

  • @aliandy.jf.nababan
    @aliandy.jf.nababan 21 วันที่ผ่านมา

    Watching you with your stuff reviews are like find out best hand tool that will not suffering your team and your own fingers.

  • @jm-alan
    @jm-alan หลายเดือนก่อน +4

    I'd love to see a summary (even just a community post) of what these tests cost you.
    Also, when making requests, do you use internal k8s namespacing, ec2 private IPs, or public/elastic IPs?

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +2

      best case $10, $50 worst case, if you forget to tear down one night it's up to $200 😊
      for tests like these i use service of type clusterip which underneath uses pod secondary ips native to aws vpc

    • @alyahmed7639
      @alyahmed7639 หลายเดือนก่อน +2

      @@AntonPutra do you mind creating a video to explain the infra side of this tests, I would like to learn more about how you make the load test, the tool you use for graphs and so on

  • @mr.nobody4494
    @mr.nobody4494 หลายเดือนก่อน +3

    Wow, what a team 😳 Nice 👌 Love this videos 😅

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +1

      thanks! :)

  • @ranggatohjaya5471
    @ranggatohjaya5471 หลายเดือนก่อน +3

    Great job anton as always😊

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      thanks ! :)

  • @AGAU1022
    @AGAU1022 หลายเดือนก่อน +3

    Thank you! This is awesome. Is it possible to do a database test like Test 2 with these languages?

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +2

      yes i was promised Zig PR with database implementation, as soon as i get it will do

  • @DueSoftware
    @DueSoftware หลายเดือนก่อน +3

    One thing I think should be done is increasing the number of CPU's. GO routines would actually fair a bit better if given a bit more opportunity for concurrency. Plus, I personally would like to see how rust and zig perform with more CPU's as well, because depending on the multi-threaded implementation we could start to see bigger differences. Overall good video though!

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +8

      thanks for the feedback, i'll do a dedicated test 1 golang instance with 4 CPUs vs 4 golang instances with 1 CPU.

    • @DueSoftware
      @DueSoftware หลายเดือนก่อน +1

      @@AntonPutra Thats a great idea! Can't wait to see it.

  • @SecretX1
    @SecretX1 หลายเดือนก่อน +11

    Test Spring Boot Webflux (Java) vs Go vs Node (JavaScript) next please!

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +7

      noted, i'll do java soon

  • @weiSane
    @weiSane หลายเดือนก่อน +19

    Ziggggggg…man I love zig.

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +4

      😊

    • @KushLemon
      @KushLemon หลายเดือนก่อน +2

      You must love segfaults. 😂😂😂

    • @pietraderdetective8953
      @pietraderdetective8953 หลายเดือนก่อน +4

      @@KushLemon how's that C++ training wheel? feels comfortable? i mean yeah safety safety safety! 😉😜

    • @KushLemon
      @KushLemon หลายเดือนก่อน +1

      @@pietraderdetective8953 Imagine getting triggered over safety without compromising performance. Zig has no benefits over C or C++. Who are you kidding? Stop being a hype journeyman.

    • @steveoc64
      @steveoc64 หลายเดือนก่อน +6

      @@KushLemon all the code is available to read, and compare to the rust code. You are free to point out any lines that are missing the safety that you think only rust has.
      There are only 65 lines of code there. Which one is missing the special rust-only magic safety ?

  • @PanMaciek
    @PanMaciek หลายเดือนก่อน +7

    That's more or less how I expected zig probably keeps everything related to request in some nice arena, rust has some small overhead for memory managementy and go has gc

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +2

      i wish someone could help with zig and postgres implementation

    • @steveoc64
      @steveoc64 หลายเดือนก่อน

      @@AntonPutra working on it .. we do have an excellent Postgres client now for zig that has several advantages over the go lib. All the guys working on these zig full stack libs are Go veterans.
      Just need to spend some time with those Postgres examples from go that you posted before
      From what I’ve seen with using zig Postgres in prod, having ported go apps to zig … I would expect to see some marginal gains over go at least.
      If the SQL test is processing a large number of rows - at least a few hundred rows in 1 request, with a tonne of embedded array fields, or JSONB, then zig slaughters the best Go code, due to Go needing to allocate + dupe each field in the resultset

  • @dhaw
    @dhaw หลายเดือนก่อน +9

    just came after watching prime reaction to bun vs go

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +1

      😊

  • @anantmishra6783
    @anantmishra6783 หลายเดือนก่อน +3

    Anton, could you do another comparison between these three, but with a db call, like you did with Bun vs go ? Thank you.

  • @SilasDuarte-e9k
    @SilasDuarte-e9k หลายเดือนก่อน +9

    Nim vs Zig next, please!

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +1

      noted

  • @pierreollivier1
    @pierreollivier1 หลายเดือนก่อน +18

    I remember in previous benchmarks, when Rust people were overly vocal about how Rust crushed Zig, but now everyone seems very silent about the Rust dominance. I love Rust but Zig is faster, and in fact I think the most impressive metric here isn't the sheer speed and performance of Zig compared to Rust, as they are both very similar and Zig is just winning by a small margin, but the fact that this is still a pre 1.0 language, and that everything developed here, took very few people, very little time, whereas Rust has had years worth of programmers time in building those frameworks, and still falls behind in terms of speed.

    • @Александр-ф9в4ю
      @Александр-ф9в4ю หลายเดือนก่อน +7

      Zzz is faster than actix
      So, zig is faster than rust. Nice!

    • @steveoc64
      @steveoc64 หลายเดือนก่อน +3

      Yeah 100%
      This bench is very much a tuning exercise (since both zig and rust are front ends to llvm)
      Zig allows us to “move fast and tune things right” :)
      The other impressive metric is looking at deps .. as IMHO, deps are the root of all maintenance evil
      The zig build has 1 only dependency
      The actix app has over a hundred

    • @RustIsWinning
      @RustIsWinning หลายเดือนก่อน +2

      Cheating at a meaningless plaintext benchmark like gnet 🤣

    • @pierreollivier1
      @pierreollivier1 หลายเดือนก่อน +2

      @@steveoc64 This is true, I never liked dependency in Rust, its "too easy" to invite dependency, which is understandable because It takes time to make things from scratch in Rust, but yeah one drawback is that one dependency, has another dependency, which has another dependency, and soon enough you have 100 deps, In Zig, the Std is the main dependency, you have most of what you could be looking for.

    • @pierreollivier1
      @pierreollivier1 หลายเดือนก่อน +3

      @@RustIsWinning It's ok dude you don't have to be petty about it, a win is a win.

  • @npcemprove6016
    @npcemprove6016 หลายเดือนก่อน +1

    Every programming language is about community, docs, packages, productivity, love etc. Performance is a bonus.

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +4

      well, as a devops engineer, i can tell you it's also about COST

    • @amzker
      @amzker หลายเดือนก่อน

      ​@@AntonPutra 😂😂 right.

    • @npcemprove6016
      @npcemprove6016 หลายเดือนก่อน

      Agree. I have worked in companies where adding a new server is cheaper than optimizing software. Its sad true. So didnt notice cost aspect in time.

    • @stxnw
      @stxnw หลายเดือนก่อน

      @@npcemprove6016 not every company can afford to just buy a new server. if you work in Formula One, you’d know you can’t just buy a new server willy-nilly due to the FIA regulations and that it’d make a lot more sense to write optimised software.

    • @RustIsWinning
      @RustIsWinning หลายเดือนก่อน

      ​@@stxnwYou work at F1? 😮

  • @MilanRodd
    @MilanRodd หลายเดือนก่อน +10

    Why go stdlib if fiber was top notch in your previous benchmark?

    • @BosonCollider
      @BosonCollider หลายเดือนก่อน +3

      Most representative of typical use, the fact that it performs as well as it does with zero dependencies is a huge win imo

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +9

      i'll do the best go frameworks vs the best rust frameworks, including fiber and ntex, soon

  • @alexanderulyev4651
    @alexanderulyev4651 หลายเดือนก่อน +2

    Очень интересно, хорошая работа!

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      spasibo!

  • @elvispalace
    @elvispalace หลายเดือนก่อน +7

    zig

  • @nupaulmiller6412
    @nupaulmiller6412 หลายเดือนก่อน +3

    ​ @AntonPutra seeing Zig vs Rust(nTex) would be interesting

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +1

      yes will do soon and gnet

  • @arimill1045
    @arimill1045 หลายเดือนก่อน +8

    Sanity test me with a pure C application in the mix please! Lets see how the OG competes :D

    • @elvispalace
      @elvispalace หลายเดือนก่อน +1

      assembly

    • @arimill1045
      @arimill1045 หลายเดือนก่อน

      @@elvispalace same thing, C just makes it portable :)

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +1

      can you please raise PR?

    • @rohithkumarbandari
      @rohithkumarbandari หลายเดือนก่อน +1

      zig is going to be faster.

    • @arimill1045
      @arimill1045 หลายเดือนก่อน

      @@rohithkumarbandari it's no Julia yet, so long as it all boils down to llvm C will be king. It just takes one poorly implemented zig binding to a C lib to cause issues.
      One day we'll get modern under-the-hood improvements baked in. LLVM holds the crown for now in terms of usability

  • @ReddihDesign
    @ReddihDesign หลายเดือนก่อน +3

    MORE DATABASE TESTS!🚀

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +1

      i'll do more

  • @DevRJPro
    @DevRJPro หลายเดือนก่อน

    Thank you for the tremendous efforts you're putting into providing us with these tests. However, I have a small remark: you are mainly comparing frameworks and not programming languages, so the title is incorrect. It should rather specify: Rust (Actix) vs Zig (zzz) vs Go (StdLib), and for Go, it's not a framework.
    There needs to be some consistency in the tests, comparing similar things. Comparing Actix to ZZZ is like racing a truck against a motorcycle-of course, the motorcycle is lighter and will win. You need to take a minimalist library in Rust and compare it to ZZZ, and there are several available.
    Once again, thank you for your efforts.

  • @samgraham6355
    @samgraham6355 หลายเดือนก่อน +1

    Lovely series!

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      thanks! 😊

  • @amine7
    @amine7 หลายเดือนก่อน +2

    Would love to see framework comparisons of the same language.

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      yes, i'll compare the best frameworks for each language soon

  • @omarmagdy1075
    @omarmagdy1075 หลายเดือนก่อน

    Great content as usual, but I just want to point you out that the voice in almost all your videos is very low I have to max out the audio on phone/pc to be able to hear your clearly

  • @МихаилШелков-п7н
    @МихаилШелков-п7н หลายเดือนก่อน +16

    Java Vertx vs Go StdLib?

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +3

      ok noted! i'll do java soon

    • @lufenmartofilia5804
      @lufenmartofilia5804 หลายเดือนก่อน

      @@AntonPutra I am interested in the Vert.x too, if you can also add rust for comparison it would really be great 💪

  • @recklessroges
    @recklessroges หลายเดือนก่อน

    Thank you. This feeds my confirmation bias.

  • @colin_actually
    @colin_actually หลายเดือนก่อน +4

    Zig 💪

  • @huakun
    @huakun หลายเดือนก่อน +3

    Maybe you can run the same tests for all languages and create a website where people can pick which languages and framework to compare, like stateofjs

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      ok i'll think about it

    • @huakun
      @huakun หลายเดือนก่อน

      @@AntonPutra I could help if you need

  • @kylek29
    @kylek29 หลายเดือนก่อน +4

    I'd be curious to see some of these newer languages against the current version of Mojo (an optimized Python-language compiler).

    • @yaksher
      @yaksher หลายเดือนก่อน +2

      That is... not what Mojo is. It is not yet even a superset of Python (except in so far as it currently embeds a Python interpreter if necessary, iirc, but that's hardly "optimized" or "compiled"), though it intends to be.

    • @RustIsWinning
      @RustIsWinning หลายเดือนก่อน

      Haha not the closed source compiler again 😂

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +1

      ok i'll try Mojo soon

  • @4lxprime730
    @4lxprime730 หลายเดือนก่อน

    i really enjoy your videos, the quality is really nice. Can you do one with vlang (maybe vlang vs golang or zig/rust) ? because i've seen pico.v on top of benchmarks for a while and i wonder if it can be that fast in real case senarios. Anyway thanks

  • @Manker00
    @Manker00 15 วันที่ผ่านมา +1

    3:40 Im quite surprised at the drop outs in rust availability. Despite Go having almost 10x as much latency, it has not dropped at all. This doesn't seem normal because why would 1 out of 50k requests just randomly fail? Might warrant further investigation imo.
    *Edit: at 4:10 Rust drops 9 out of 90k requests, while Go still doesnt drop a single one. And at 4:30 Go drops its first request, while rust drops 21 out of 106k. Something hast to be wrong, otherwise 6:50 would not look this wierd.

  • @BuffRobotiX
    @BuffRobotiX หลายเดือนก่อน

    What tool do you use to show these graphs? It looks very nice!

    • @roberto_camp
      @roberto_camp หลายเดือนก่อน

      it looks like Prometheus/Grafana?

  • @ziriusph3395
    @ziriusph3395 หลายเดือนก่อน +22

    can you please do NodeJS vs PHP? let's finally end the argument

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +6

      yes, but i need to test deno v2 first :)

    • @ziriusph3395
      @ziriusph3395 หลายเดือนก่อน

      @@AntonPutra okay thanks, we can wait until end of the month once NodeJS 22 becomes the official LTS. so that it becomes NodeJS 22 vs PHP 8.3. I'm also excited for the Deno 2 comparison :D

    • @dansouza1623
      @dansouza1623 หลายเดือนก่อน

      NodeJS and nginx+phpfpm have very different execution models, it wouldn't be a fair comparison. Comparing NodeJS with something like PHP Swoole would be a fairer comparison (both event-based asynchronous runtimes)

    • @julienlecoq3539
      @julienlecoq3539 หลายเดือนก่อน

      @@ziriusph3395 well, deno 2 is slower than the previous version unfortunately. But it is expected to improve in the future.

    • @wahidfeb
      @wahidfeb หลายเดือนก่อน

      ​@@dansouza1623comparing to what most people use would be more fair. With php most people just deploy it using cpanel shared hosting, not a manual from scratch vps setup. But yeah comparing to php swoole would be interesting too.

  • @srigi-dev
    @srigi-dev 3 ชั่วโมงที่ผ่านมา

    That sad smiley face of Go at 6:18 made me laugh :))

  • @arcj0602
    @arcj0602 หลายเดือนก่อน +3

    if you look at it from the fair point even when golang is not doing any optimization hacks it's still keeping up a good rate. zzz uses io_uring under the hood so obviously it will be faster because there are less syscalls. I like to see how it compares with gnet in golang which also uses io_uring👍

    • @simp_lex
      @simp_lex หลายเดือนก่อน

      I acknowledge that zzz could be faster than Rust from the start because it used io_uring as the runtime. I expect that changing the global allocator in Rust and switching to tokio-uring could lead to better performance.

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      thanks for bringing up gnet, i'll definitely try it out since they claim 'gnet is the fastest networking framework in Go.'

  • @DavidDLee
    @DavidDLee หลายเดือนก่อน +2

    This kind of test is not very important to most real systems. To a few unique systems it can be crucial.
    All the service does is return a string (not sure if it is static or not), which no real system does at high rate. I am pretty sure you can make a Rust version that would be as performant for this specific test (though I don't know Rust). It really matters what framework you use for such an a service.
    On the other hand, if you add async complexity, where the service needs to perform other requests, your test becomes meaningless.
    What you should really do instead is design a test where the service does some DB query. The results will be much different.
    Better, if you can simulate some variance with some DB requests being slow on purpose, then measure the capacity (QPS) of each solution.

  • @_sumitk
    @_sumitk หลายเดือนก่อน

    Can you do one video on how you setup and conduct these tests?

  • @costathoughts
    @costathoughts 11 วันที่ผ่านมา

    Anton, if do you can share the cost of the infras and the Benchmarks it would be amazing.

  • @antosha2224
    @antosha2224 16 วันที่ผ่านมา +1

    Почему-то мне кажется что раст и зиг так и останутся просто игрушками. С точки зрения количества спецов на рынке и перфоманса го это идеальный вариант.

  • @МаксимМакаров-к8б
    @МаксимМакаров-к8б หลายเดือนก่อน +1

    I think there is a good idea to work with shared memory with multiprocessing. For example write and read data from cache upon hashmap + rwlock

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      you mean what zig has with zzz?

  • @dimap6793
    @dimap6793 หลายเดือนก่อน

    Awesome video, could you also make some comparassions with ruby on rails, i.e. ruby vs nodejs

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      yes, i'll do ruby on rails soon

  • @adarshsingh764
    @adarshsingh764 หลายเดือนก่อน +2

    I don't know much about rust and its frameworks, but is there a reason for choosing actix over axum?

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +1

      yes, i did a benchmark in the past where actix performed better, but there is ntex, which i also need to test in the near future

    • @eyz-4
      @eyz-4 หลายเดือนก่อน +2

      axum is easier than actix in my opinion. in most benchmarks i've seen though actix outperforms axum.

  • @hkupty
    @hkupty หลายเดือนก่อน +8

    I think this is a bit unfair to golang tbh. ZZZ is using io_uring instead of epoll which will significantly improve performance. Actix doesn't look like it's using it so kudos to rust for keeping up with a nice performance even without it. One "flaw" of the ZZZ framework it seems is not to provide the handler with a `std.io.Writer`, which means it could potentially outperform rust even more if it avoids this two-step process (write to function-local memory, then pass it on to the HTTP buffer), but I guess it could be hard to do that with io_uring? idk, but feels like a potential improvement there.
    As for go, it seems to be stuck in the worst of all scenarios: Not using io_uring, allocating tons of memory *and* serializing json through reflection, but I guess that's the point of using the default library in go's case. I'd imagine a custom json encoder would easily skew the graphs for golang.. It really depends on how much one wants to refactor. If the goal is to deliver "regular joe's" kind of performance, maybe this is significant enough, though, again, it's a bit unfair that go doesn't do io_uring while zig does. However, if one wants to test highly optimized versions of each app then I assume going with the default golang library is not the best choice against a 45 star, 4 month old library crafted to be _the_ most performing zig HTTP server.

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +4

      thanks! i appreciate your feedback! i'll do the best go frameworks vs the best rust frameworks, including fiber and ntex, soon

  • @simp_lex
    @simp_lex 13 วันที่ผ่านมา

    Please compare again this test!!!

  • @user-df4xh7yi2w
    @user-df4xh7yi2w หลายเดือนก่อน +3

    Can you stop using the standard library of go ?

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +1

      😂 i'll do the best golang frameworks vs the best rust frameworks soon

  • @GameBully2K
    @GameBully2K หลายเดือนก่อน +1

    Probably a good rust pr will improve things on it's side

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      I got one for Actix with experimental support for io_uring - github.com/antonputra/tutorials/pull/311

  • @seRko123
    @seRko123 หลายเดือนก่อน +1

    Would you do ruby on rails vs python django? Api those interpreted languages that are not top of performance would be interesting

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      yes i'll do them soon

  • @requestfx5585
    @requestfx5585 หลายเดือนก่อน +3

    I dont think blurring helps since im 99% sure red is rust, blue is go and orange is zig 😂 The colors are matched too well

  • @johanavril1691
    @johanavril1691 หลายเดือนก่อน +1

    nice video, is zig compiled in ReleaseSafe or ReleaseFast ?

    • @steveoc64
      @steveoc64 หลายเดือนก่อน +2

      ReleaseFast
      You can see the PR where this code is submitted- it has bench figures for debug + safe + fast
      Zig debug is a bit slower, zig safe is about 2-5% slower than fast .. doesn’t make a huge difference
      Rust debug is significantly slower than zig debug mode
      Rust release and zig fast are more or less equivalent in terms of memory safety. There is no transfer of ownership happening in these handlers, so the extra safety of the borrow checker isn’t coming into play here. The zig build has better memory leak safety than rust here, due to using arenas over RAII style memory cleanups

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +1

      ReleaseFast
      original pr - github.com/antonputra/tutorials/pull/280
      source code for the video - github.com/antonputra/tutorials/tree/215/lessons/215

    • @stasgavrylov
      @stasgavrylov หลายเดือนก่อน

      @@AntonPutra is client-side code available anywhere? looks very nice

  • @MrTrollland
    @MrTrollland หลายเดือนก่อน

    not sure how to submit a pull request but something worth noting is if a function constructs a Device object the generated assembly has some lea instructions in it (according to godbolt with -O). conversely if u declare the device to be const, then only mov and movups instructions are used,, which could improve performance

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      thanks, in the real world, it will never be a const, right? but if you can create a PR, i would appreciate it -github.com/antonputra/tutorials

  • @ugurpelister
    @ugurpelister หลายเดือนก่อน

    There is a new high-perf programming language called Vale. it's at the alpha stages just like Zig. Would you compare Zig and Vale?

  • @grandlagging0zero175
    @grandlagging0zero175 หลายเดือนก่อน +2

    спасибо за видео. Потестируй clojure and haskell and f# and gleam..elixir? erlang?

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +1

      horosho, spasibo za feedback, sdelay skoro

    • @grandlagging0zero175
      @grandlagging0zero175 หลายเดือนก่อน +1

      @@AntonPutra тебя кстати prime посмотрел :)

  • @sachindraragul1094
    @sachindraragul1094 หลายเดือนก่อน

    Can you do a video on functional languages such as Ocaml vs F# vs Haskell vs Clojure vs Elixir?
    I think it would be interesting for many.

  • @ЛевНикулин-й2р
    @ЛевНикулин-й2р หลายเดือนก่อน +3

    please compare dart with golang

  • @illdieanyway7865
    @illdieanyway7865 หลายเดือนก่อน +1

    No C benchmark?

  • @Ar3Schannels
    @Ar3Schannels หลายเดือนก่อน

    what do you use to male those awesome charts?

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      prometheus + grafana

  • @wahidislamlinad
    @wahidislamlinad หลายเดือนก่อน +1

    would like to see similar comparison between elixr, go, java, c#

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      ok will do!

  • @j-p-d-e-v
    @j-p-d-e-v หลายเดือนก่อน +15

    Even though I love developing apps in Rust. I always see Zig will slightly be more performant than Rust since Zig is like the modern version of C.
    Great content!
    Thank you Beyonce!

    • @BosonCollider
      @BosonCollider หลายเดือนก่อน +2

      Main takeaway from the results was that Rust and Zig are very close to each other though

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      thank you!

    • @jfolz
      @jfolz หลายเดือนก่อน

      C, Rust, and Zig are all systems programming languages without GC etc. Barring compiler optimizations, there is no reason why any of them should be faster than the other. If you browse the results of the benchmarksgame, you will find plenty of Rust submissions that are faster than C and vice-versa.

  • @iulikdev
    @iulikdev หลายเดือนก่อน +16

    Now we need a rust expert to redo the test! 🤣🤣

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +16

      i'll do the best go frameworks vs the best rust frameworks, including fiber and ntex, soon

    • @jcbritobr
      @jcbritobr หลายเดือนก่อน +2

      @@AntonPutra actix isn`t the best rust framework.

  • @jcbritobr
    @jcbritobr หลายเดือนก่อน +1

    Why not use Axum instead of Actix? Axum is well maintained by the tokio team.

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      Based on my previous benchmark, Actix performed better. I'll try Ntex soon as well.

  • @kujojotaro3464
    @kujojotaro3464 หลายเดือนก่อน

    What do you use to setup dashboards and metrics collection? I can see that this is grafana, but do you have any guides how you set up clients?

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      i deploy prometheus using the prom operator and use grafana for visualization

    • @kujojotaro3464
      @kujojotaro3464 หลายเดือนก่อน

      @@AntonPutra Thank you for responding, I saw it in source code, but couldn’t find source code for “clients”, could you share it too or maybe give me a hint where it could be?

  • @RmAndrei93
    @RmAndrei93 หลายเดือนก่อน +3

    Would be instesting ktor vs spring both in kotlin

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      ok noted!

  • @supindersingh8882
    @supindersingh8882 หลายเดือนก่อน +2

    I am disappointed with go's performance.

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      i'll pick better frameworks next time maybe gnet or fiber

  • @allenraizel5538
    @allenraizel5538 หลายเดือนก่อน +3

    Elixir vs Go vs Java multicore pls

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +1

      ok noted

  • @vanance7235
    @vanance7235 หลายเดือนก่อน

    What about the Elixir Phoenix tests? But in fact, it is much easier for him to work with persistent connections, like WebSocket, but it is still interesting to compare it with other high-level languages like Go or C# / Java. Ideally, when working on 2-4 threads

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      i'll do elixir soon, i promise

  • @brockdaniel8845
    @brockdaniel8845 หลายเดือนก่อน +3

    Maybe try C++ with Oat++, Drogon, CrowCpp

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +2

      noted! i'll start c++ soon

  • @aunjaffery31
    @aunjaffery31 หลายเดือนก่อน +2

    No s3, no db queries this time?

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      my bad

  • @Vedmalex
    @Vedmalex หลายเดือนก่อน +1

    cool!!!
    can you check performance of MOJO vs ZIG

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      sure, will do in near future

  • @ouchlock
    @ouchlock หลายเดือนก่อน

    Could you compare Rust vs NodeJS to motivate ppl to switch?

  • @DimitriSabadie
    @DimitriSabadie 22 วันที่ผ่านมา +1

    At this point, the question that stands is not really language vs. language, but implementation vs. implementation…

  • @rnp.rudranarayanpanda
    @rnp.rudranarayanpanda หลายเดือนก่อน

    Hey dude, can you compare deno 2 with bun, please!! Also one comparison of Postgresql vs Surrealdb!!

  • @mrpocock
    @mrpocock หลายเดือนก่อน

    Can these benchmarks feed back into improving the libraries?

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +1

      maybe

  • @Z3U5.0g
    @Z3U5.0g หลายเดือนก่อน

    Can you redo the Bun vs Go with multithreading on multiple CPUs? Also do check out Prime’s reaction.

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +1

      yes, but first i'll do deno v2

    • @Z3U5.0g
      @Z3U5.0g หลายเดือนก่อน

      @@AntonPutra Please use multithreading on multiple CPUs this time. You can also use web workers on JS side.

  • @dukeofnorfolk1842
    @dukeofnorfolk1842 หลายเดือนก่อน +1

    Do the lesser known like Scala, Crystal, Ballerina

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      ok, i'll try them, especially scala. i used it in the past to write some etl pipelines

  • @CraigPerry
    @CraigPerry หลายเดือนก่อน

    Why does the cpu profile have downward spikes for zig and go but not for rust? What’s the behaviour difference, is this a difference in how tokio is scheduling work? 6:21

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      interesting, i hope some zig or go experts can explain

  • @paulc1724
    @paulc1724 26 วันที่ผ่านมา

    would it be easy to run this test with static cpu allocation on the kubernetes end?

  • @BáchHoàng-d7f
    @BáchHoàng-d7f หลายเดือนก่อน

    Which tool you are using to show the metric?

    • @Dionismgn
      @Dionismgn หลายเดือนก่อน

      Grafana

  • @iduran
    @iduran หลายเดือนก่อน +2

    Elixir?

    • @djm4z
      @djm4z หลายเดือนก่อน

      This would be awesome

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน +2

      soon

  • @PouriyaJamshidi
    @PouriyaJamshidi หลายเดือนก่อน

    why not give two CPU cores to all these containers? Go suffers like that.
    Also, awaiting Nim's video impatiently
    Keep up the good work

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      i gave all containers 2 CPUs - github.com/antonputra/tutorials/blob/main/lessons/215/k8s/deploy/go-app/0-deployment.yaml#L37

  • @j.r.r.tolkien8724
    @j.r.r.tolkien8724 หลายเดือนก่อน +1

    Nice.

    • @AntonPutra
      @AntonPutra  หลายเดือนก่อน

      thanks!

  • @ulrich-tonmoy
    @ulrich-tonmoy หลายเดือนก่อน

    wow zig 0.13 is close to rust in cpu usage from the beginning and more memory efficient for more requests what will it be after the V1
    And i think they said zig is lower than c and closer to asm

  • @erlangparasu6339
    @erlangparasu6339 29 วันที่ผ่านมา +1

    please make vid about Swift (backend)

    • @AntonPutra
      @AntonPutra  29 วันที่ผ่านมา +1

      will do