► What should I test next? ► AWS is expensive - Infra Support Fund: buymeacoffee.com/antonputra ► Benchmarks: ru-vid.com/group/PLiMWaCMwGJXmcDLvMQeORJ-j_jayKaLVn&si=p-UOaVM_6_SFx52H
Heyy we have a facecam, good progress! :) Also, I want to make a bit of a brave and maybe unrealistic suggestion: Azure vs AWS vs Google Cloud. Some workload similar to what you normally do. Choose similar machine types and storage, use each cloud provider's Postgres as-a-service solution.
@@isenewotheophilus6485 agreed, and there's probably too many variables to consider, with hundreds of machine types and network settings that may change latency. Still would be nice though
It would make a lot of sense, here we're coming to conclusion that 20ms over 24ms per request at 80k rps is "Speed". But in reality, 24 ms is barely ever reachable in any capacity of interaction, other than server-server within same data-center.
@@RaphaelBobillot42 Yeah that's true. Elixir compiles to erlang bytecode, as I understand it, so there shouldn't be much of a difference between those three languages. I guess it'd be more interesting to see any of those languages against Rust/Go/Node/...
Антон герой нашего времени! :) Классно бы было проверить дикие, хайповые базы: 1) Surreal DB vs Edge DB (vs PostgreSQL для масштаба). 2) SQLite vs PostgreSQL
Hey, just wanted to say that I love these! At some point, I would like to see a short course on the subject. Just working through test setup, things your take into consideration, testing codebase development, etc etc.
Advice for future benchmarks, when you monitor apps built on languages with garbage collection (java, javascript, c#) you should also monitor gc collections, pauses and so on. This is is one of the biggest performance bottleneck on these languages.
@@AntonPutra For Java, it's complicated because the JVM has several GC algorithms, and then there are several JVMs with different performance profiles, so you need to adapt to your application, which is time consuming.
I love how your videos are getting progressively and incrementally better and better each time. 👍🏻 Loving it. As an application layer guy this is stuff that I really don’t get as much exposure to, but would love to.
@@AntonPutraplease, if possible, add to your list comparison between any javascript interpreter (bun/deno/node) and laravel octane. I would really love to see what superceeds - fixed amount of workers or event based exexusuon
I chose Deno over Bun not just because of the usual claim, 'my runtime is faster.' The real reason is that, unlike Bun, the Deno team takes a more thoughtful approach to features. Bun releases features that no one asked for, including monkey patching.
Damn... last time I saw your video about 2 weeks ago, I was thinking to comment about these 3... but for some reason I forgot to comment it, but you still made the video
Great video! I don't understand how Deno can publish such different looking results. According to their latest marketing push, Deno beats Node and Bun in many metrics. Am I missing something or are the folks at Deno stretching the truth?
Benchmarks are all about which metric you consider the most important. Deno got the best overall Client Request Latency. One could argue that's what matters the most. (Which depends)
@@isenewotheophilus6485people are so lazy. He's going to be testing some fringe tech in 6 months and some noobie is going to show up like "node vs bun, please!"
Lua vs go? They are not even comparable. I mean their purpose is totally different. One is compiled, garbage collected static typed language and the other is easy to embed dynamic language. It's like comparing shopping cart with airplane.
@@Gornius openresty is sponsored by cloudflare to embed and run scripts inside nginx, they could somehow use Go instead if they really wanted, but they chose Lua. No two languages are the same, sure they're different, but you can use literally any language for any kind of task, and sometimes the results may be surprising. Golang borrowed multiple return from Lua btw. Also they both share the keep it simple philosophy.
Please be careful with Deno. Found some funny stuff for that. I created a small project for an interview using next js. And with then app router stuff. What happened is that I used curl to send a Delete request with Body to my app, but could not find the body as it only returns ReadableStream: false. Switched running to NPM and it just worked. It was just a simple logging the passed data. Soo again, just be careful
That's a lot of videos! I would very much appreciate a reminder at the beginning of videos stating that synthetic benchmarks like these ones are not representative at all of real world scenario. Each real situtation deserves its own benchmarks, taking into account its specific context and constraints. And I feel like in most real word situtations the differences displayed in these benchmarks are negligeable.
It's very interesting to see the difference between vanila node.js vs popular frameworks. Nest.js for example. I know that it works on top of express or fastify but feels like those abstraction layers ruin all the performance. Thank you for you content!
Anton, you have 3 videos for Rust VS Zig. the latest video shows that Zig beat Rust but the other two are the opposite. Which video should I bring to my boss if I want to use Zig? 😆😆😆
The boss probably wouldn't care 😂. Anyway, Zig vs Rust is not very conclusive as both are system-level PL and non-GC. It's more accurate to say they run almost neck-to-neck. But there is definitely a greater possibility than Rust that anything built in Zig/C/C++ can have bugs because they have weaknesses in memory management, we don't need a devops benchmark to know that.
Whenever I get a PR with improvements, I rerun my tests, so I guess the latest one is the most accurate. However, it uses a Zig framework with the new io_uring Linux kernel feature, which is why it's better. I also got a PR with Rust support for io_uring, but it's using experimental flags. I would suggest going over the PRs in my repo and looking at the detailed improvements with benchmarks attached.
Great videos! I get the impression that if I need an application that interacts a lot with a database, Node can be a good choice to some extent. Would it be correct to say that if my application only needs to process requests and interact with other APIs, bun performs better than Node?
The persistence layer (database) will be the bottleneck in virtually all cases that need persistence. In these cases, optimization is all about slow db interactions as much as possible (caching, indexes, query optimisation). The 2ms difference of the runtime is negligible compared to all db ops.
Awesome! (I skipped ahead a bit to the tests, the first part was a bit technical for me for just casual viewing) Ryan said deno is also optimized for cold starts. I think bun has made claims about being able to install packages quickly as well. Maybe that could be part of a test?
Deno and Bun are both real fast! But for now, I'll stick with Node.js due to its ecosystem. Regarding the Requests Per Second (RPS) result, Deno 2 showed slightly lower RPS compared to Bun, likely because V8 pointer compression is disabled in Deno 2. If this issue is addressed, Deno 2 could potentially match Bun's performance!
what do you mean by ecosystem? isn't bun and deno compatible with all npm packages? and run on all major platforms? what bun and deno does not have that nodejs have?
that's interesting, I firstly though the memory between deno & bun would be almost the same (probably bigger than node). I though it's mostly because of the Typescript -> JS transpiler cache in both deno & bun, but turns out it might not because of only that in deno cases. I suspecting V8 memory fragmentation might be worst than JSCore (JSCore has much more simpler JSValue encoding than V8).
Hey, it would be nice to have a Spring Webflux vs Quarkus vs Golang benchmark, the last quarkus vs golang didn't show the breaking point of any of those. Thank you for this awesome job!
@@wojciechosinski5927 it depends on which metric is the one being measured. Overall Deno performed better than Bun in Client Request Latency. One could argue that's what would matter the most in most use cases? So there's always a tradeoff (less memory/CPU vs client latency)
I guess overall rust's memory safety at runtime is at work with deno when we compare it to bun or node causing it to have more latency. Great video though
What memory safety feature in particular though? A lot of the safeguards are just present at compile time and in debug mode. Bun and Deno use different JS engines (V8 vs Apples ???). Another possibility could just be the efficiency of the libraries in each language. I also heard that the Bun creator does a lot of micro-optimizations. Overall, I think there are a lot of reasons for the performance difference. Comparing 2 languages by the performance of their ecosystems is very hard.
@@NabekenProG87 yeah it has more to do with optimizations than underlying language. you can completely misuse a language and an objectively slower language could outperform in that scenario. it all comes down to optimizations.
THIS IS THE MOST ANTICIPATED VIDEO FOR ME LETS GOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
There is probably very small difference in real-life workloads. For God's sake, people used Python to build Instagram and youtube backends. Bun can still claim to be the king of hard-coded hello world benchmarks tho.
I'm certain that no company IRL would tax their CPUs this way, they would have long scaled either vertically or horizontally. But maybe for the sake of saving CPUs, they didn't use the framework from the official website or CPython itself, but some customized django backend that's even more lightweight, and an implementation that's faster than CPython. And then some, part of the youtube backend is said to be written in Go which is more performant than CPython.
@@dukeofnorfolk1842 maybe he is, but there is a lot of truth to it. if you care about performance on the server you shouldn't be using javascript at all. bun is fast relative to node but not relative to go or rust.