Is Bun really 3x faster than Node.js and Deno? We put it to the test!

Sdílet
Vložit
  • čas přidán 24. 08. 2022
  • Full benchmark source and results here: github.com/builderio/framewor...
    #javascript #js #nodejs #react #webdev

Komentáře • 84

  • @marcofelt
    @marcofelt Před rokem +138

    Dude when he showed Hello World react app I broke🤣

  • @jon1867
    @jon1867 Před rokem +81

    I have this weird hunch that bun is going to be the runtime I build an app with in like 2-5 years.

    • @mikopiko
      @mikopiko Před rokem +2

      It tries to be all-in-one tool, so

    • @zancrow_gaming
      @zancrow_gaming Před 7 měsíci +2

      Yeah. We web developers can never catch a rest always gotta learn new languages and frameworks 😤

    • @jon1867
      @jon1867 Před 7 měsíci +1

      ​@@zancrow_gaminghonestly for a lot of people bun isn't a new thing to learn it's just a different tool to use. Honestly 10 minutes using bun and it's pretty intuitive to anybody in the node ecosystem. There are rough edges right now, but if they fix those rough edges then it's not like learning a whole new thing

    • @arshiagholami7611
      @arshiagholami7611 Před 3 měsíci

      ​@@zancrow_gaming literally took me 1hr to learn Elysia and bun basics. Their docs are amazing

  • @pixel7038
    @pixel7038 Před 8 měsíci +8

    Keep in mind react has a huge bottle neck of re-rendering components and nextJs uses nodejs for api routes even with Bun. That’s why I’m a huge svelte supporter

    • @impe001
      @impe001 Před měsícem

      You can choose whether you want to re-render or NOT and even whether you load the rendering on client or server so yeah in react it can re-render more than needed but only because you didn't program it correctly

  • @rynnkanra5262
    @rynnkanra5262 Před rokem +68

    btw, which version of Bun, Node, and Deno did you used?

    • @mohammedissam3651
      @mohammedissam3651 Před rokem +8

      Good question
      Edited: witchcraft
      He used
      1)bun v0.1.0
      2)node v18.1.0
      3)deno v1.23.2
      No really it's in the beginning of the video 😅

    • @adammuse3541
      @adammuse3541 Před rokem +1

      probably the same versions bun used in their example

    • @Gamer-ct6hb
      @Gamer-ct6hb Před rokem +1

      @@mohammedissam3651 You're wrong. That isn't his benchmark. That's the one listed on the website. He uses bun v0.1.10 from when he showcases bun install. The rest I couldn't find.

  • @8koi245
    @8koi245 Před rokem +13

    BLAZINGLY FAST

  • @Luxcium
    @Luxcium Před rokem +37

    Is wicked faster than blazingly ???

    • @BboyKeny
      @BboyKeny Před rokem +16

      We need some benchmarks for that

    • @DAB009
      @DAB009 Před 9 měsíci +2

      ​@@BboyKeny then its time to write another javascript benchmark library 😂😂

  • @charliegnu
    @charliegnu Před rokem +14

    What do you use for the benchmark? Also was this using their dev servers or a production setup? I'd like to know more about how different they are to configure for production.

  • @Dev-Siri
    @Dev-Siri Před rokem +21

    for some reason deno & nodejs are the only ones competing right now in terms of performance.
    Currently nodejs 19.2.0 is faster for ssr-ing react (21k) while deno 1.29.1 comes at 18k requests
    a few months ago, deno was faster than node for average queries per second when loading a huge table in sqlite (30+ Queries).
    But then nodejs version 19 improved on the speed with 32 queries. And know Deno is 3 queries ahead (35)
    Ryan dahl really created an enemy for himself

    • @echoptic775
      @echoptic775 Před rokem +10

      Oh no, now node has to work on performace when its acrually getting some competition

    • @charlesm.2604
      @charlesm.2604 Před rokem +6

      ​@@echoptic775 I see it as a win

  • @nicolasguillenc
    @nicolasguillenc Před rokem +4

    Nice it would be interesting to see a migration tutorial

  • @Saeid-Za
    @Saeid-Za Před rokem +1

    Thanks for the video !

  • @mohammedgt8102
    @mohammedgt8102 Před 9 měsíci +2

    They are usually hot and fast when they are young. They get fat and slower as they get older.

  • @code.cracking
    @code.cracking Před rokem

    Gotta try it

  • @danvilela
    @danvilela Před rokem +5

    So, Zig is not why Bun is faster. Having said that, what prevents Deno from using Safari’s JS engine and being as fast but more trustworthy because of Rust?

    • @fueledbycoffee583
      @fueledbycoffee583 Před rokem

      i could not find a good answer online so I will dare to infer the next: since it was Ryan Dahl the one that wrote Deno, i guess he wanted to use a tool that he was familiar with... I think it was hard enough to "rewrite" node in rust but to also add the difficulty factor of using a totally different js engine.

    • @sunejack7161
      @sunejack7161 Před rokem

      Bro you can't get everything in one tech

    • @danvilela
      @danvilela Před rokem +1

      @@sunejack7161 nevertheless, I am asking for the justification. This is engineering, every technical detail has an explanation. You must be new here

    • @heroe1486
      @heroe1486 Před 9 měsíci

      @@danvilela You must be too since your conclusion "Bun is not faster because of Zig" (and implying it's because of the safari engine) has no basis, it might be the case but literally no element in this video prove that, that's not how logic nor engineering work.

    • @danvilela
      @danvilela Před 9 měsíci

      @@heroe1486 actually I got that from an article when bun was out. Thought you guys would know it too, but you must be new here then

  • @coderswat
    @coderswat Před rokem +7

    Pewdiepie start coding?

  • @nyahhbinghi
    @nyahhbinghi Před rokem +2

    bun bun time

  • @codecaine
    @codecaine Před 9 měsíci +3

    I love using bun so far.

  • @vivarantx
    @vivarantx Před rokem +5

    node will make some upgrades and beat both, we should wait before switching

  • @shubitoxX
    @shubitoxX Před 10 měsíci +1

    Speed is not everything, e.g. is it making security shortcuts or not?

  • @garrysyt8461
    @garrysyt8461 Před rokem

    So what does that exactly mean . By building the apps in bun our websites will be faster than in node js ?

    • @ban-prem-001
      @ban-prem-001 Před 8 měsíci

      the response from your server will be faster when user requests data

  • @fahmitaib
    @fahmitaib Před rokem +1

    when can I start scaffolding a new qwik project using bun?

    • @a-yon_n
      @a-yon_n Před 9 měsíci +1

      You can use it as a replacement of npm, it’s extreamly fast when installing dependencies

    • @fahmitaib
      @fahmitaib Před 9 měsíci

      @@a-yon_n I know. I personally I use pnpm because bun still has a lot of incompatibility issues and pnpm has been great, but my question is about scalfolding/creating a new qwik project rather than installing and managing dependencies and packages.

    • @a-yon_n
      @a-yon_n Před 9 měsíci

      @@fahmitaib perhaps we should be bolder to explore the frontier

    • @fahmitaib
      @fahmitaib Před 9 měsíci

      @@a-yon_n what?

  • @lutfiikbalmajid
    @lutfiikbalmajid Před rokem

    is bun version 1 release?

  • @nyomansunima
    @nyomansunima Před 8 měsíci

    Yeah, i tried bun and is fast

  • @Thassalocracy
    @Thassalocracy Před 8 měsíci +1

    PNPM is very sad right now 😢😢😢😅😂

    • @ban-prem-001
      @ban-prem-001 Před 8 měsíci

      pnpm is package manager, not runtime

  • @anhvuuc8693
    @anhvuuc8693 Před 21 hodinou

    i just try Bun, i want to leave Node now, it so fast @@ freaking fast 💨

  • @Anshucodes
    @Anshucodes Před 9 měsíci

    How to do benchmark load test and autorun is useless

  • @moscow8881
    @moscow8881 Před rokem

    Ничего не понятно но очень интересно

    • @sgelagaev
      @sgelagaev Před rokem +1

      Все понятно, но вообще не интересно.

  • @turolretar
    @turolretar Před 9 měsíci

    The bun is not even cooked

  • @UlrichTonmoy
    @UlrichTonmoy Před rokem +2

    So is Zig faster than Rust

    • @charliegnu
      @charliegnu Před rokem +2

      Both use LLVM to compile to machine code. Is LLVM faster than LLVM? Is machine code faster than machine code?

    • @carlpittenger
      @carlpittenger Před rokem +1

      @@charliegnu more like "which language and compiler implementation produces the most efficient llvm ir?" though you'd of course have to take into account the ecmascript runtime implementations as well to see if this would even be a good benchmark to use to generalize entire languages.

    • @BboyKeny
      @BboyKeny Před rokem +1

      Coding branchless helps a bunch I think. Division and square roots are also slow, bit hacks are often fasted.
      Loops can be very slow too.
      And can you reduce the operations needed through refactorings?
      Zig doesn't do magic allocations, so that can make some difference compared to Rust or C++. I know that some C compilers do awesome optimization by checking for certain coding patterns, which is probably because people have been working for a long time on those compilers.
      So I think programs are usually bottlenecked by the code rather than the language when talking about these manual memory managed low-level languages.

    • @sunejack7161
      @sunejack7161 Před rokem

      YES! Zig is faster than Rust

    • @sunejack7161
      @sunejack7161 Před rokem

      ​@charliegnu they're not the only compile languages that use LLVM. Or you mean all LLVM languages perform at same level?

  • @balt.
    @balt. Před 9 měsíci

    that sounds like an AI voice

  • @throwaway6288
    @throwaway6288 Před rokem +2

    We don’t need it bro we have all the tech we need.

    • @thev01d85
      @thev01d85 Před rokem

      This

    • @Gamer-ct6hb
      @Gamer-ct6hb Před rokem +5

      But speed is like. Important. Bun is just easily usable. Drop in replacement from what I understand. And it's based on Safari so less vulnerabilities. Because chromium is based on Webkit. And that means it has more vulnerabilities.

    • @vivarantx
      @vivarantx Před rokem

      ​@@Gamer-ct6hb little benefit to make the switch, this is a toy app

    • @heroe1486
      @heroe1486 Před 9 měsíci +1

      @@Gamer-ct6hb "Bun is just easily usable", then show us your apps built with it, it's boviously not a drop in replacement, is beta software and as most things has its trade offs.

  • @mohammedissam3651
    @mohammedissam3651 Před rokem +2

    Here is the thing they all did that in one sec 🤣
    if blink you miss it all 🤪

  • @ZachHarkey
    @ZachHarkey Před rokem

    Hehe 420

  • @chervilious
    @chervilious Před 9 měsíci

    Bun better than node

  • @NathanHedglin
    @NathanHedglin Před rokem +4

    You know what is even faster and better? C#, Java, Go, Rust etc

    • @Gamer-ct6hb
      @Gamer-ct6hb Před rokem +6

      You just named sometimes slower languages. Except for rust and maybe Go. Just recommend C, Rust and Assembly. That's all we need. The others have less performance most of the time. Assembly is still the best for performance.

    • @itsTyrion
      @itsTyrion Před rokem

      depends, sometimes, sometimes, yes.
      FTFY.
      At least if we're talking raw performance

    • @heroe1486
      @heroe1486 Před 9 měsíci

      @@Gamer-ct6hb Go is fast while still feeling like a high level language, show us those real (non hello world or nonsensical) benchmarks where node/deno are faster than Go or even Java for that matter.

    • @heroe1486
      @heroe1486 Před 9 měsíci

      @@itsTyrion It's not "sometimes", in almost all cases those languages would crush any JS runtime for real world apps, JS devs are parrots

  • @LarsRyeJeppesen
    @LarsRyeJeppesen Před 4 měsíci

    Ew it turned into React too quick...

  • @efeonobrakpeya9883
    @efeonobrakpeya9883 Před 10 měsíci

    Another framework that does the same thing😂

  • @Pokemonman44441
    @Pokemonman44441 Před rokem +3

    Bun is like vue. Another framework nobody asked for. React is just better than Angular & Vue. We have Node & Deno. Now Deno is supposed to be the replacement. Bun won’t be that replacement because Deno is that replacement at some point whenever node becomes deprecated.

    • @snowytones
      @snowytones Před rokem

      What the fuck are you on about?

    • @theLowestPointInMyLife
      @theLowestPointInMyLife Před rokem

      Idiot web dev

    • @bonniesitessolutions7728
      @bonniesitessolutions7728 Před rokem +6

      why/how is react better than angular and vue?

    • @harshhingu3082
      @harshhingu3082 Před 10 měsíci +1

      Maybe because with React Native we can make Android and IOS apps.

    • @heroe1486
      @heroe1486 Před 9 měsíci +3

      @@harshhingu3082 That's not what makes something "better", being more versatile is just an aspect and most people actually don't care about native apps and/or use better solutions. The guy above is just trolling and is mostly a question of preferences.
      Vue is faster than React
      Vue is more "complete" than React, things like Routing, Transition etc are managed by the core team
      Vue has better APIs, need less boilerplate
      React has a broader ecosystem
      React has better TS support
      JSX vs Template is preference