Rust vs Zig vs Go Performance

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

КОМЕНТАРІ • 579

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

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

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

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

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

      Deno2 vs Go/Python.

    • @Z3U5.0g
      @Z3U5.0g 3 місяці тому

      Hey Prime reacted to your Bun vs Go video.

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

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

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

      Scala-ZIO-HTTP vs elixir-phoenix vs go

  • @_Aarius_
    @_Aarius_ 3 місяці тому +148

    I am impressed by Zigs performance!

  • @andresaguilar3055
    @andresaguilar3055 3 місяці тому +123

    It's amazing how fast you upload this quality content

  • @arrow_function
    @arrow_function 3 місяці тому +95

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

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

      noted!

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

      ​@@AntonPutraYes please this is an actual test

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

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

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

      @@podakov it depends on the framework being used

    • @tonyhart2744
      @tonyhart2744 Місяць тому +3

      they all the same, because using llvm basically the output (machine code) isnt much different
      ofcourse there are difference but I doubt it would even matters tbh

  • @steveoc64
    @steveoc64 3 місяці тому +25

    ❤ 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

  • @michaelutech4786
    @michaelutech4786 3 місяці тому +16

    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.

  • @gabrielborges8854
    @gabrielborges8854 3 місяці тому +14

    addict to this channel, plase dont stop to make videos

  • @hughesabsalom526
    @hughesabsalom526 3 місяці тому +150

    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. 3 місяці тому +33

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

    • @JosephMcMurray1984
      @JosephMcMurray1984 3 місяці тому +11

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

    • @SkylearJ
      @SkylearJ 3 місяці тому +30

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

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

    • @rohithkumarbandari
      @rohithkumarbandari 3 місяці тому +15

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

  • @piotrbielski9624
    @piotrbielski9624 3 місяці тому +49

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

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

      noted! i'll do java soon

    • @random-i2s
      @random-i2s 3 місяці тому +7

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

      @@random-i2s Indeed, good idea!

    • @NivedSuresh-e9h
      @NivedSuresh-e9h 3 місяці тому

      @@AntonPutra this

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

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

  • @Manker00
    @Manker00 3 місяці тому +10

    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.

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

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

  • @cesarmartinez2207
    @cesarmartinez2207 3 місяці тому +128

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

    • @huakun
      @huakun 3 місяці тому +6

      Deno claims to be better than bun in many benchmarks

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

      coming in a week!

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

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

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

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

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

      @@huakun extension system for a browser?

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

    Great job anton as always😊

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

    I loved the video. Excellent work!

  • @codetothemoon
    @codetothemoon 24 дні тому +1

    this video is fantastic, thank you!

  • @dmitry_rellek
    @dmitry_rellek 22 дні тому +3

    Best Zig pitch ever.

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

    🍿 Benchmarks: ua-cam.com/play/PLiMWaCMwGJXmcDLvMQeORJ-j_jayKaLVn.html&si=p-UOaVM_6_SFx52H

  • @mr.nobody4494
    @mr.nobody4494 3 місяці тому +3

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

  • @neryolo
    @neryolo 3 місяці тому +45

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

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

      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  3 місяці тому +2

      thanks! noted!

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

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

  • @DueSoftware
    @DueSoftware 3 місяці тому +5

    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  3 місяці тому +10

      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 3 місяці тому +1

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

  • @aliandy.jf.nababan
    @aliandy.jf.nababan 3 місяці тому

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

  • @PanMaciek
    @PanMaciek 3 місяці тому +8

    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  3 місяці тому +2

      i wish someone could help with zig and postgres implementation

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

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

  • @josevargas686
    @josevargas686 16 днів тому +1

    Good! My app with 5 users will be so performant!!

  • @majesticonyx
    @majesticonyx 3 місяці тому +53

    Zig really caught my attention.

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

      it's fast

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

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

    • @mrkcodes
      @mrkcodes 3 місяці тому +27

      ​@@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 3 місяці тому +18

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

      @@majesticonyx no. Just C with defer keyword.

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

    Lovely series!

  • @pegasusgemini6541
    @pegasusgemini6541 24 дні тому +1

    Zig is impressive! I didn't it could compete with Rust.
    Can you try the same benchmark but using raw hyper or axum instead of actix ?

  • @SecretX1
    @SecretX1 3 місяці тому +11

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

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

      noted, i'll do java soon

  • @alexanderulyev4651
    @alexanderulyev4651 3 місяці тому +2

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

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

    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 3 місяці тому +5

      Angualr in Go would be awesome.

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

      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 3 місяці тому +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 3 місяці тому +1

      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 3 місяці тому

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

  • @CommanderRiker0
    @CommanderRiker0 3 місяці тому +8

    Zig is really impressive

  • @mubinmuhammad9713
    @mubinmuhammad9713 3 місяці тому +6

    Zig is just great!

  • @dhaw
    @dhaw 3 місяці тому +8

    just came after watching prime reaction to bun vs go

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

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

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

    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.

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

    I get that these tests try to only use stdlibs, but I'd love to see how Go compares with some more efficient libraries such as Fiber and Sonic for JSON. These tests are about real-world performance, and any app that actually needs performance will (or should) move away from the stdlib pretty early in development.

  • @rockandrolldevil665
    @rockandrolldevil665 6 днів тому

    awesome man

  • @jm-alan
    @jm-alan 3 місяці тому +2

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

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

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

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

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

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

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

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

    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

  • @user-uk9er5vw4c
    @user-uk9er5vw4c 2 місяці тому

    you are the man!

  • @bjo004
    @bjo004 3 місяці тому +7

    zig is insane. Wow!!!😮

  • @PatrickOnEngineering
    @PatrickOnEngineering 21 день тому

    Interesting to see how the microbenchmark would work with 1.24 and framework rewrite with weak pointers.

  • @МихаилШелков-п7н
    @МихаилШелков-п7н 3 місяці тому +16

    Java Vertx vs Go StdLib?

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

      ok noted! i'll do java soon

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

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

  • @kylek29
    @kylek29 3 місяці тому +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 3 місяці тому +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 3 місяці тому

      Haha not the closed source compiler again 😂

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

      ok i'll try Mojo soon

  • @amine7
    @amine7 3 місяці тому +2

    Would love to see framework comparisons of the same language.

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

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

  • @Shaunmcdonogh-shaunsurfing
    @Shaunmcdonogh-shaunsurfing 19 днів тому

    So interesting!!

  • @lyoneel
    @lyoneel 19 днів тому

    I think using a framework vs no-framework is a massive advantage.

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

    MORE DATABASE TESTS!🚀

  • @arcj0602
    @arcj0602 3 місяці тому +2

    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 3 місяці тому

      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  3 місяці тому

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

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

    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

  • @huakun
    @huakun 3 місяці тому +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  3 місяці тому

      ok i'll think about it

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

      @@AntonPutra I could help if you need

  • @Br4dButt0wski
    @Br4dButt0wski 17 днів тому

    Could you please compare C++, Odin, Zig and C3 please?

  • @MrBranh0913
    @MrBranh0913 21 день тому

    Only issue with these lower level languages on the backend is memory management. Zig is completely manual memory management which can have some undesired results and make things much harder to troubleshoot as you scale in complexity. And for Rust you have the borrow checker, but you need to learn how to work with it to get the most performance out of Rust. Go will have latency naturally because of the GC. But for a GC'd language, Go has impressive performance. And you can tune aspects of the GC with Go. It won't reach the performance of the other 2, but I think Go is the perfect balance of simplicity and performance

    • @chrboesch
      @chrboesch Годину тому

      In Zig you can use an arena allocator and then you don't have to free memory manually. Or use the GPA allocator which will show your memory leaks. So many ways to do it right.

  • @jcbritobr
    @jcbritobr 3 місяці тому +2

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

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

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

  • @benedickmontales6096
    @benedickmontales6096 19 днів тому

    How about V lang? Can you also do a benchmark for it. Thanks.

  • @arimill1045
    @arimill1045 3 місяці тому +7

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

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

      assembly

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

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

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

      can you please raise PR?

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

      zig is going to be faster.

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

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

  • @МаксимМакаров-к8б
    @МаксимМакаров-к8б 3 місяці тому +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  3 місяці тому

      you mean what zig has with zzz?

  • @nupaulmiller6412
    @nupaulmiller6412 3 місяці тому +2

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

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

      yes will do soon and gnet

  • @ziriusph3395
    @ziriusph3395 3 місяці тому +22

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

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

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

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

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

      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 3 місяці тому

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

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

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

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

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

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

      yes, i'll do ruby on rails soon

  • @DavidDLee
    @DavidDLee 3 місяці тому +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.

  • @richcole157
    @richcole157 18 днів тому

    Are you using connection reuse from your clients? How many tcp connections?

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

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

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

    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.

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

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

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

    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?

  • @rajkun69
    @rajkun69 12 днів тому

    I would any day choose Go for it's simplicity

  • @JonRandylCalderon
    @JonRandylCalderon 28 днів тому

    Hi I am a noob kubernetes dev here. Just curious did you use an HPA in this since you are using xlarge for the zig, go and rust. And I notice you limit them to 2 cpu so I was curios if you used an HPA for this test.

  • @costathoughts
    @costathoughts 2 місяці тому

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

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

    Please compare again this test!!!

  • @hkupty
    @hkupty 3 місяці тому +9

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

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

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

    Out of curiosity have you tried not standard json encoder in go? Or cpu profile in general?

  • @doriandd4648
    @doriandd4648 23 дні тому

    We’re supposed to believe that the code itself doesn’t matter, neither do any of the external bottlenecks?

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

    Would be instesting ktor vs spring both in kotlin

  • @lumirverner9789
    @lumirverner9789 20 днів тому

    What do you think about nim?

  • @iulikdev
    @iulikdev 3 місяці тому +16

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

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

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

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

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

  • @RickySupriyadi
    @RickySupriyadi 22 дні тому

    oh no I'm sold to try zig

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

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

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

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

  • @rnp.rudranarayanpanda
    @rnp.rudranarayanpanda 3 місяці тому

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

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

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

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

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

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

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

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

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

      it looks like Prometheus/Grafana?

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

    please make vid about Swift (backend)

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

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

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

    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  3 місяці тому

      i'll do elixir soon, i promise

  • @ЛевНикулин-й2р
    @ЛевНикулин-й2р 3 місяці тому +3

    please compare dart with golang

  • @user-df4xh7yi2w
    @user-df4xh7yi2w 3 місяці тому +2

    Can you stop using the standard library of go ?

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

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

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

    Are there sources available for the aputra/load-tester ?

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

      not yet, but it's very similar to the other clients i have in my repo. it's just that i need to refactor it before i can release it

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

    Zig 💪

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

    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  3 місяці тому

      interesting, i hope some zig or go experts can explain

  • @Z3U5.0g
    @Z3U5.0g 3 місяці тому

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

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

      yes, but first i'll do deno v2

    • @Z3U5.0g
      @Z3U5.0g 3 місяці тому

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

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

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

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

      noted! i'll start c++ soon

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

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

  • @ulrich-tonmoy
    @ulrich-tonmoy 3 місяці тому

    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

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

    zig

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

    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  3 місяці тому

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

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

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

    • @MatheusHenrique-sk2od
      @MatheusHenrique-sk2od День тому

      @@AntonPutracan u release a video doing this setup?

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

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

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

      sure, will do in near future

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

    No C benchmark?

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

    Elixir vs Go vs Java multicore pls

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

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