Performance Comparison: Fact or Propaganda? Node.js vs. Bun

  Рет қаралды 4,342

codeForMe

codeForMe

8 ай бұрын

Which runtime performs better when handling dynamic content and template rendering, especially under heavy loads?
To make a fair comparison, we've created two similar applications and put them on separate servers with the same specs.
While performance matters, it's not the only thing to look at.
Project repository: github.com/Moh-Snoussi/nodejs...

Пікірлер: 16
@sammy12337
@sammy12337 8 ай бұрын
Very good, your channel's will soon grow🚀!
@mom_4life132
@mom_4life132 8 ай бұрын
They kick off at 7ms, and Bun edges ahead by ~30ms. But is that enough to make the switch from Node.js? For me, it's not just about the milliseconds - it's the time, effort, and potential compatibility issues.
@snoussihamza2345
@snoussihamza2345 8 ай бұрын
Awsome content, keep going!
@code-for-me
@code-for-me 8 ай бұрын
Thanks, will do!
@ajayshivhare
@ajayshivhare 8 ай бұрын
Thanks keep it up
@code-for-me
@code-for-me 8 ай бұрын
Thank you too
@ashwink4442
@ashwink4442 8 ай бұрын
Good Quality
@code-for-me
@code-for-me 8 ай бұрын
Thank you for your feedback!
@rizkyadisaputra
@rizkyadisaputra 8 ай бұрын
ok then show us how it reliable in the future in term of its security
@code-for-me
@code-for-me 8 ай бұрын
Bun plans to eliminate potentially unsafe code through static analysis rather than runtime permission checks. Runtime permission checks may be considered in the future: github.com/oven-sh/bun/discussions/725
@jihedsboui4331
@jihedsboui4331 8 ай бұрын
tounsi el youtuber hedha ?lol
@code-for-me
@code-for-me 8 ай бұрын
yes, I'm Tunisian! 😄
@steveoc64
@steveoc64 8 ай бұрын
Micro benchmarks are pretty useless. Bun is a safer bet long term … why ? Codebase. Node’s codebase is a bit of a mess, and is past the point of being able to keep up. Bun’s codebase is lean and mean, with plenty of room to continue to make quantum leaps. It has at least 2 more years of dramatic improvements in the pipeline before it slows down.
@code-for-me
@code-for-me 8 ай бұрын
We hope that Bun will be a better bet. As for the determination of which codebase is 'better,' I think that can be subjective and context-dependent. Do you consider the current tests I conducted as micro benchmarks?
@steveoc64
@steveoc64 8 ай бұрын
@@code-for-me Yeah, sry ... my "microbenchmarks" comment was more aimed at general comments floating around the inter webs in the form "OK, so its a bit faster here, and a bit faster there .. but .... compatibility / safety is more important", whilst (IMO), missing a bigger picture. This is a point you made at the end of the video as well (but for possibly different reasons) Your performance tests here are pretty thorough - bit more than microbenchmarks for sure. Appreciate the work you put in to do that + post to github + edit a video... that's still a lot of work, and deserves respect :) Performance numbers .... hmmm. They are close indeed, but both a bit on the slow and memory hungry side ? I would be interested in seeing how far this can be pushed using just JS tooling ... just for fun of course :). Be nice to see either of them handle the loads with sub-millisecond response times. Im keen to have a play with that and see how far each can be pushed. Something to think about ... and it would make great material for a followup video. On codebase "betterness" ... yes that is always going to be subjective, especially when things are close. In this case, the codebases are far from being close. The Node codebase in C++ is understandably quite full of baggage now after all these years. The Deno codebase (in Rust) is pretty much set in concrete, and is a horror to experiment with. The Bun codebase is written in Zig, which is a much nicer language to do tricky system programming with. So just saying that Bun is on a really fast trajectory with adding features because of this current codebase. Deno won't be able to keep up. For example - memory usage ! It's 2 weeks since you posted the video, and in the interim, Jarred has mentioned that they have been able to drop the memory usage way down. You could also try re-running your benchmarks with `bun --smol bun_server.js` which will give less memory, at the cost of a bit of performance. More tuning options should follow soon hopefully.
@code-for-me
@code-for-me 8 ай бұрын
Thanks, I'll certainly take your suggestions into account, especially regarding the --smol flag. Your input has been very insightful, particularly regarding the codebase differences.
Bun vs Node.js - Everything You Need To Know!
23:01
Codevolution
Рет қаралды 35 М.
Is TypeScript (NodeJS) Faster than Go?? |  A server comparison
9:54
ThePrimeagen
Рет қаралды 211 М.
Can you beat this impossible game?
00:13
LOL
Рет қаралды 62 МЛН
$10,000 Every Day You Survive In The Wilderness
26:44
MrBeast
Рет қаралды 108 МЛН
Bun Is Better Than I Hoped
12:58
Theo - t3․gg
Рет қаралды 125 М.
Laravel vs Next.js Performance Comparison: You are all wrong!
4:07
Setting the Record Straight: Next.js vs Laravel
6:28
Robin He
Рет қаралды 2,3 М.
100 Days of Node.js vs Bun - Who is the winner?
15:13
Mehul - Codedamn
Рет қаралды 32 М.
WinterJS -  A New Javascript Runtime
27:06
ThePrimeTime
Рет қаралды 177 М.
DO NOT USE BUN (bun install is good dough)
17:54
strager
Рет қаралды 138 М.
I Stopped Using Express.js: Because Bun and Hono 🔥
10:23
Sam Meech-Ward
Рет қаралды 102 М.
Bun is disrupting JavaScript land
4:30
Fireship
Рет қаралды 967 М.
My thoughts on Bun
5:33
Lee Robinson
Рет қаралды 44 М.
Не обзор DJI Osmo Pocket 3 Creator Combo
1:00
superfirsthero
Рет қаралды 1,3 МЛН
How To Unlock Your iphone With Your Voice
0:34
요루퐁 yorupong
Рет қаралды 19 МЛН
Где раздвижные смартфоны ?
0:49
Не шарю!
Рет қаралды 615 М.
Карточка Зарядка 📱 ( @ArshSoni )
0:23
EpicShortsRussia
Рет қаралды 668 М.