DO NOT USE BUN (bun install is good dough)

Поделиться
HTML-код
  • Опубликовано: 2 июн 2024
  • 00:00 Bun is here
    00:31 porting to Bun
    01:05 log import perf
    02:40 MariaDB perf
    03:21 reporting perf
    03:50 bun install on dev
    06:14 macOS disk usage
    06:37 bun install on CI
    07:19 porting the website
    09:30 bun test
    12:08 bun --watch
    12:54 page load speed
    14:32 CI builds
    15:55 more testing
    16:27 pros and cons of Bun
    17:26 me and Bun
    Benchmark code: github.com/quick-lint/bun-vs-...
    (Analytics benchmarks use production data not present in the repo due to privacy concerns.)
    Hardware used for benchmarks:
    Linux dev machine: AMD Zen 3 5950X; Linux Mint 21.2; Linux 5.19.0-46-generic
    Mac dev machine: Apple MacBook Pro M1 Max (2022)
    VPS: Vultr; 1 Intel Haswell vCPU; Ubuntu 20.04; Linux 5.15.0-50-generic
    Software used for benchmarks:
    Node version v20.6.1
    Yarn version 1.22.19
    Bun version v1.0.1
    Thumbnail artwork by Jennipuff
    Bun logo copyright Codeblog Corp
    Node.js logo copyright OpenJS Foundation nodejs.dev/en/about/branding/
    Yarn logo copyright yarnpkg(?), Creative Commons Attribution 4.0 International (CC BY 4.0) license
  • НаукаНаука

Комментарии • 514

  • @YandiBanyu
    @YandiBanyu 8 месяцев назад +727

    Man, this right here is an example of quality content. You don't only show results but most importantly HOW you get those results. Testing methodologies are often omitted for simplicity but I believe it reduces content quality by a lot.

    • @enkiimuto1041
      @enkiimuto1041 8 месяцев назад +15

      I never met this channel and the first 10 seconds made me subscribe.

    • @MaxCoplan
      @MaxCoplan 8 месяцев назад +9

      imagine a RUclips video with _error bars_???!

    • @Microphunktv-jb3kj
      @Microphunktv-jb3kj 8 месяцев назад

      Jest isnt actually slower than Jasmine, considering how much more features you use ; ]
      Jest is a more modern and comprehensive testing framework than Jasmine. Jest includes features like snapshot testing, code coverage analysis, and parallel test execution, which are unavailable in Jasmine.

    • @strager_
      @strager_  8 месяцев назад +20

      > Jest includes features like snapshot testing, code coverage analysis, and parallel test execution, which are unavailable in Jasmine.
      Even if you use none of those, Jest is slower.
      With Jest, you pay a cost for features you do not use.

    • @Yazan_Majdalawi
      @Yazan_Majdalawi 8 месяцев назад +8

      I loved how he addressed the growing problem of lazy youtubers uploading themselves only reading the marketing announcements of new technologies.

  • @wernersmidt3298
    @wernersmidt3298 8 месяцев назад +684

    Your first merch could be a shirt: Bun --run doesn't run bun, but bun --bun run runs bun.

    • @AndersonPEM
      @AndersonPEM 8 месяцев назад +44

      This... is just... BRILLIANT

    • @strager_
      @strager_  8 месяцев назад +51

      I already have merch: strager.net/booty/

    • @shiftyjesusfish
      @shiftyjesusfish 8 месяцев назад +17

      I thought I hadastroke reading this the 1st time. Brilliant lol

    • @Microphunktv-jb3kj
      @Microphunktv-jb3kj 8 месяцев назад

      Buntime, Funtime :D

    • @kyguypi
      @kyguypi 8 месяцев назад +14

      How many runs could bun --run run if --run ran bun --bun run?

  • @MondeSineke
    @MondeSineke 8 месяцев назад +104

    This is the guy you need in every team. Sometimes, we get excited about new tools until we dug ourselves into a hole.

  • @circusfreakRob
    @circusfreakRob 8 месяцев назад +56

    "Bun run doesn't run bun, but bun --bun run runs bun" is gonna be stuck in my head all day now.
    Great video. Appreciate the detailed comparison. Alleviates my Bun FOMO for the time being.

  • @FederalPandas
    @FederalPandas 8 месяцев назад +253

    Absolutely incredible video - there's been a lot of hype (and a small amount of skepticism) around bun; but this is the first "proper" comparison I've seen that goes beyond "hello world"
    Also loved the little "bun pun counter" at the bottom right

  • @jdubz8173
    @jdubz8173 8 месяцев назад +98

    For work related projects, I swapped in node just to see if it was going to be a smooth process. It was not. However, on a home project that doesn't have a client (yet) the server-side bun processing and testing has been phenomenal, imo. Makes me hope Bun continues improving for sure.

  • @breytonpabst1009
    @breytonpabst1009 8 месяцев назад +12

    Really quality video here, I feel like you are amazing at showing how different frameworks and tools compare in an actual production environment rather than just one that was built simply for the benchmark. This is only Bun 1.0 so there is a good chance a lot of things improve over the next few years, so I’d be interested to see a similar video a few years down the line seeing if bun was able to pull off what it promised outside of its package manager.

  • @LKD70
    @LKD70 8 месяцев назад +34

    Great to see a more balanced perspective. i really like the direction of Bun, especially it's APIs. Will certainly play a bit with it and keep an eye on its hopeful progress

  • @quinn479
    @quinn479 8 месяцев назад +4

    Appreciate the deep dive into this! You do a great job of covering the real issues that would unfortunately only surface in complicated builds.

  • @CielMC
    @CielMC 8 месяцев назад +248

    I would say bun is definitely promising, iterative design can get you far, though sometimes you just need to start over for big optimizations. It definitely needs more polish and battle testing, but I think the direction is good, it's a little overhyped rn.

    • @user-fr2fm3ri3w
      @user-fr2fm3ri3w 8 месяцев назад +21

      The concept is good , they literally tried to purge as much js from the code base and replace it with zig without killing the ecosystem and surprisingly it works very well for how new this is. Remember how much of a pain ts was to set up when it was new? In comparison bun is more polished but still has a long way to go.

    • @andrewdunbar828
      @andrewdunbar828 8 месяцев назад +4

      I agree with everything you say except that I find it to be hyped just the right amount. Hype exposure is relative to what we look at too I suppose.

    • @CielMC
      @CielMC 8 месяцев назад +3

      @@andrewdunbar828 Yeah I see what you mean, I'm personally seeing a bit too much sentiment to rush it into prod because free performance, but that's kinda the blind "is googer" mentality that comes with any new technology I guess

  • @mcspud
    @mcspud 8 месяцев назад +11

    Great video. Specific metrics like this add a lot to the quality, something you're one of the few to do it.
    Also, "bun bun run runs bun" is the great piece of alliteration you've produced.

  • @ssmith5048
    @ssmith5048 8 месяцев назад +6

    Great video! Really a great job on this - like your perfect hash tag vid, the time flew by while watching this. The bun pun counter was a nice as well! Still the best video on bun to date imo.

  • @elcontrastador
    @elcontrastador 8 месяцев назад +8

    Nicely done. I did some testing too and found similar results. I think what made me put bun back in the oven was when I was getting partial results with no errors or warnings. I just happen to notice some data missing, and then ran with node and the data was there. I would've been fine if I had an error thrown, but I don't have time for silent errors. I'll check back in on Bun 2.0.0

  • @Wepper1
    @Wepper1 8 месяцев назад +8

    This video is a good reminder that as professionals, we can't take marketing at face value and we should conduct rigorous tests and benchmarks to make any real recommendations for new technologies. This video is excellent in demonstrating those values.

  • @n.fejzic
    @n.fejzic 8 месяцев назад +3

    Awesome video! Thank you for measuring stuff and not just reading reports made by others!

  • @blehbleh9283
    @blehbleh9283 8 месяцев назад +166

    Would love to see a comparison with deno as well with all of these tests. Or releasing a test suite based on this

    • @strager_
      @strager_  8 месяцев назад +53

      I hope no one builds a benchmark suite based on my crappy code! 😅

    • @ssmith5048
      @ssmith5048 8 месяцев назад

      hmmm suspicious if this comment is not from emcee ; ) @@strager_

    • @vaisakhkm783
      @vaisakhkm783 8 месяцев назад +3

      @@strager_ XD and when someone says this is crappy and try to implement themself only to end up more crappier...
      It works... that's what matters..

  • @LukasSkywalker_
    @LukasSkywalker_ 8 месяцев назад +2

    Thanks for this video.
    I also tried Bun with some of my projects as well and I got a lot of incompatibility errors.

  • @doovel
    @doovel 8 месяцев назад

    Great to see someone actually go in-depth on the issues!

  • @_modiX
    @_modiX 8 месяцев назад +3

    You're killing it once again. Good job! To my surprise, bun doesn't look so stable after all, I mean `bun --bun run`?

  • @Sebastian-hg3xc
    @Sebastian-hg3xc 8 месяцев назад +8

    Thank you so much for doing the work for us. 🙂

  • @trapfethen
    @trapfethen 8 месяцев назад +23

    It appears that JSC (JavaScriptCore) has lackluster performance when it comes to RegEx. Notebly, several RegEx patterns cause JSC to fallback to interpreting and won't be JIT'ed. In addition, JSC appears to be slower for some JIT'ed RegEx as well, likely due to some transformations that V8 is doing that they are not. A bug report has been filed with WebKit about this and hopefully they will address it in time. If your use-case relies heavily on complex RegEx, I would definitely benchmark Node VS Bun to see which one is faster. Simple RegEX appear to be comparable between the two runtimes, but the separation between simple and complex RegEx is not at all clear.

  • @bryantaylor8504
    @bryantaylor8504 8 месяцев назад +15

    What a great example of how to do an objective comparison of two technologies. It definitely feels like bun has some rough edges and is a little buggy. It has some potential, but I think you've convinced me to wait and look back in a few months.

  • @turtleidiot3324
    @turtleidiot3324 8 месяцев назад +9

    Thank you for running some real world tests. I did ort of expect something like this since bun hit 1.0 literally a few days ago but i'm holding out and hoping that speeds and compatibility improve in the near future

  • @juanmacias5922
    @juanmacias5922 8 месяцев назад

    These were great benchmarks, thanks for sharing!

  • @godnyx117
    @godnyx117 8 месяцев назад +40

    I'm only at the 2 minutes in the video and I cannot hold myself on already writing a comment. I would like to thank you for been a quality creator, which is something very rare in our days.
    Like you did say, most others just made a video after Bun's 1.0 announcement (which is very funny because before that, almost NOBODY big talked about bun but now suddenly, it got so much attention because it hit a milestone? Shows you how these people think...) and they just read the announcement. I did like that you put the effort to make real tests however because I follow Bun for a long time and while they claim to be faster (even "much" faster) than NodeJS, there are indeed a lot of case where they are much, much slower!
    Of course, I like the effort behind Bun. These type of projects where people try to replace the "industry standard" tools and make better ones are great, I am making one myself. The problem is that when promises that cannot be met are made and when people lie. In my opinion, Bun should change the whole "faster than NodeJS" to "lighter than NodeJS and an all-in-one tool"! Once Bun matures enough where it's more stable, supports every major API and it beats Node in EVERY test, it can go back to that "faster than NodeJS" motto! Until then, trying to get focus to your project by lying isn't a good idea and it will only backfire at some point!

    • @GreatTaiwan
      @GreatTaiwan 8 месяцев назад

      to be fair prime did many benchmarks with bun before, fireship did a video back in the day about it like a year ago if not mistaken.
      however of course official release for something highly anticipated will get a lot of views hence many creators will make videos about it

    • @strager_
      @strager_  8 месяцев назад +3

      > before [Bun 1.0], almost NOBODY big talked about bun
      Both ThePrimeagen and Theo made videos about Bun many months before 1.0.
      ThePrimeagen: ruclips.net/video/qAYFepR4GcE/видео.html
      Theo: ruclips.net/video/Rp5yvwX7orE/видео.html

  • @orderandchaos_at_work
    @orderandchaos_at_work 8 месяцев назад

    I found Bun flakey/broken in places too, glad to hear I'm not alone in running in to various bugs and issues with it. Looks like you had a lot more patience than I did haha, good work.

  • @nzuzomal4545
    @nzuzomal4545 6 месяцев назад +1

    That was pretty good. You've clarified some bun weirdness I've experienced myself!

  • @sammiewalker1020
    @sammiewalker1020 4 месяца назад +2

    Wow ACTUAL testing?? You've got a subscriber.

  • @AV_YOUTUBE_202X
    @AV_YOUTUBE_202X 8 месяцев назад

    Thank you for doing this review.
    I’ve been working in Node for a dozen years.
    Now I’m deciding whether to advance my stuff to Deno, or to Bun.
    Deno it is.
    A very informative review!!!

  • @jonton6981
    @jonton6981 8 месяцев назад

    Thank you for adding error bars in a benchmark comparison.

  • @xavhow
    @xavhow 8 месяцев назад +46

    nice, real world benchmark.
    it seems Bun's node compatibility has a long way to go.
    great info!

    • @MrEnsiferum77
      @MrEnsiferum77 8 месяцев назад +2

      that's not the point of bun...

    • @xavhow
      @xavhow 8 месяцев назад +8

      @@MrEnsiferum77
      this is actually important or else Bun has to start off its ecosystem from scratch.

    • @user-fr2fm3ri3w
      @user-fr2fm3ri3w 8 месяцев назад

      @@xavhowahem demo 🥶

    • @xavhow
      @xavhow 8 месяцев назад

      @@user-fr2fm3ri3w well, at least better than a lot of helloworlds out there.

    • @despareint
      @despareint 8 месяцев назад +1

      that's the whole point of bun, we already have stubborn deno@@MrEnsiferum77

  • @mrvectorhc7348
    @mrvectorhc7348 8 месяцев назад +1

    thanks for this video, very useful to see some practicality to the Bun story

  • @itsbadrabbit716
    @itsbadrabbit716 8 месяцев назад +1

    This is awesome, thanks for sharing, Strager!

  • @VideoGameBoxReviews
    @VideoGameBoxReviews 8 месяцев назад +2

    Thank you for all the work, very interesting, hope the bun devs take a look at this.

  • @DevR00ts
    @DevR00ts 8 месяцев назад

    Oh.. I just asked you a question on X about where/how you learned all of this, and here you are on youtube! I had no idea you were a content creator, but im glad I found you!

  • @kelownatechkid
    @kelownatechkid 8 месяцев назад

    Very entertaining presentation, and valuable real-world usage report! Kudos

  • @ivanjermakov
    @ivanjermakov 8 месяцев назад +36

    I agree that using Bun in prod is not a good idea. I haven't noticed much performance gain in actual runtime, but using it for running/testing TypeScript application is a charm, I can absolutely recommend it for local builds as a drop-in Node replacement.

    • @strager_
      @strager_  8 месяцев назад +12

      Yeah, I imagine Bun's transpilation is better for TypeScript projects.

    • @follantic
      @follantic 8 месяцев назад

      I found it useful for having esm in a simple executable ad hoc script. Having imports, commonjs and __dirname available out of the box is really nice. I think NodeJS should learn from that.

  • @AlbertCloete
    @AlbertCloete 8 месяцев назад +14

    Quality content. I much prefer learning about people's real experiences using a tool, rather than the marketing videos and people talking about the marketing videos.

    • @MrEnsiferum77
      @MrEnsiferum77 8 месяцев назад +1

      The problem is that, people jumpwagon on bun, not because they like it, but in 2023 JS still is crap about merging all important stuff all together... typescript, decorators, observables and linter... i'm asking for this four every single day... i don't like crap tooling with 20plus dependencies...

  • @JeremyChone
    @JeremyChone 8 месяцев назад +3

    Great video. Thank you for this great real dev content.

  • @thenwhoami
    @thenwhoami 8 месяцев назад +9

    Really nice testing. I'm still excited for the promise of bun. Bun is IMO what Deno should have always been - focus heavily on node compatibility while coming batteries included to simplify the developer's life. I hope they keep going.

    • @MaxCoplan
      @MaxCoplan 8 месяцев назад +5

      Maybe. The creator of Deno (and Node) said the whole point of Deno was to make what a server-side JS runtime always should have been. That means removing all the bullshit Node has. Adding backwards-compatibility would be antithetical to that vision.
      Of course, it turned out that developers don't care about it having better fundamentals from the ground up, and just wanted a better Node.js with TypeScript, fetch, sane module system, test framework, and other conveniences. They don't want to rewrite their projects to be "better". This is what Bun and for the most part newer Node.js does. No code rewriting required 👍🏻

    • @rand0mtv660
      @rand0mtv660 8 месяцев назад +1

      @@MaxCoplan Yeah Deno team totally backtracked on that original idea and went hard into Node/NPM compatibility. They probably realized they won't get much market share without doing that.

    • @phoenix-tt
      @phoenix-tt 8 месяцев назад

      ​@@rand0mtv660The only issue is that they didn't succeed in it. I tried using Deno in a pretty simple CLI application where I also needed to use npm packages and Puppeteer. From the build experience all the way to running it was not a pleasant trip.
      I switched to node+esbuild and got it running within minutes...

  • @Saitanen
    @Saitanen 3 месяца назад

    Amazing real-world benchmarks! Thank you! Finally someone with actual practical use cases on RUclips.

  • @nekekaminger
    @nekekaminger 8 месяцев назад

    Great work! I'm sure your insights will be quite valuable for the bun developers.

  • @cameronstroebel3333
    @cameronstroebel3333 8 месяцев назад

    Very informative, thank you for sharing!

  • @Kotfluegel
    @Kotfluegel 8 месяцев назад +1

    The bun video I've been looking for. Thank you very much.

  • @calebhoff3506
    @calebhoff3506 Месяц назад

    i loved this video & would totally watch a node vs deno one

  • @prhasn
    @prhasn 8 месяцев назад

    Excellent breakdown. Thanks for sharing this.

  • @masmullin
    @masmullin 8 месяцев назад +2

    Thanks for the real world analysis. I hope you follow up in a few months.

  • @memaimu
    @memaimu 3 месяца назад +1

    I love how this video immediately follows the Bun 1.0 release video.

  • @Dacas5
    @Dacas5 8 месяцев назад +2

    what a great video, just what we needed with all of the bun hype!

  • @RemotHuman
    @RemotHuman 8 месяцев назад +1

    I like that it runs my typescript files without transpiling. It does thus better than the esrun package which is what I was using, esrun wasn't showing proper error traces

  • @0netom
    @0netom 8 месяцев назад +1

    The burp at the end was the perfect conclusion of this topic!
    That's exactly what happens after such a bun feast :)

  • @DeanHerbertMooCow
    @DeanHerbertMooCow 8 месяцев назад

    really cool analysis, thanks strager

  • @combinio9533
    @combinio9533 8 месяцев назад +2

    This is the video we didn't deserve. Thanks for sharing!

  • @xfreeman86
    @xfreeman86 8 месяцев назад +1

    "I'm not going to just read the blog post for you" My exact thought on the first Bun video that RUclips recommended to me. Finally some value add.

  • @SergioJWero
    @SergioJWero 8 месяцев назад

    Incredible video, thank you

  • @casraf
    @casraf 8 месяцев назад

    Absolutely nailed all the puns there good work
    Also yes I was skeptical of all their claims and now understandably so. But maybe this is something that will improve in the future as they make it more mature. Will be interesting to see if it rises from here

  • @thegrumpydeveloper
    @thegrumpydeveloper 8 месяцев назад +1

    Awesome to see this. I’m surprised they announced this as production ready given. This type of stuff is better to wait till the kinks get worked out on test and fun projects before shipping to prod traffic to it.

    • @strager_
      @strager_  8 месяцев назад

      Agreed. Let other people take the risks! xD

  • @EvgenyBobkin
    @EvgenyBobkin 8 месяцев назад

    thank you, great insights, that must be very frustrating, like putting so much effort into migration to bun, just to find out that the app is so much slower when running on bun.

    • @strager_
      @strager_  8 месяцев назад

      My plan was to make this video, so I accomplished my goal.

    • @strager_
      @strager_  8 месяцев назад

      I think it's unfair to say that the app was slower with Bun. Some parts were slower and some parts were faster.

  • @ericlindell3777
    @ericlindell3777 8 месяцев назад +1

    Great down to earth video!

  • @pawan29121991
    @pawan29121991 7 месяцев назад

    thanks @strager . It is worth to evaluate ourselve at this level before we start adopting...

  • @ItzAnameOk
    @ItzAnameOk 8 месяцев назад +1

    Objective and to the point. Strager never fails to fill up my bun with his knowledge 😫😩😳

  • @khashe
    @khashe 8 месяцев назад

    I saw a tweet saying the Bun team has the same definition of stable as the Vercel team. That sums up my experience using Bun so far.

  • @toffeethedev
    @toffeethedev 8 месяцев назад +6

    Very thorough!! Thanks so much for giving us real world stats

  • @isaac8228
    @isaac8228 8 месяцев назад +5

    Cant wait for recruiters next year to look for bun jobs with 5 years of experience

  • @JoRyGu
    @JoRyGu 8 месяцев назад +5

    Is this a RUclipsr that actually uses a product before spouting off a bunch of hype BS about it? Where am I?
    Seriously though, thank you for putting out content about the actual user experience with bun. What they promise is pretty exciting so hopefully they're able to get there eventually but it definitely seems like the "1.0" release was a little premature.

  • @MichaelKubler-kublermdk
    @MichaelKubler-kublermdk 8 месяцев назад

    Great work and now I know I don't need to rush into trying a Bun project.
    Maybe in a few years Bun will be better, but right now it seems OK and they've mostly cherry picked a bunch of things they've sped up.
    Although the packages aren't checked with the network, so you don't actually know if your packages are the latest version.

    • @strager_
      @strager_  8 месяцев назад

      > Although the packages aren't checked with the network, so you don't actually know if your packages are the latest version.
      This is the case with Yarn as well in my application.

  • @Raynhardx
    @Raynhardx 8 месяцев назад +1

    I wonder if every exception thrown in bun is slower (and some programs use exceptions for control flow, so you may never see an error as they are in a try/catch). But if bun transpiles every source for require/import compatibility and to digest typescript, it has to postprocess error stacktraces against the source maps to get proper line count reporting.

    • @strager_
      @strager_  8 месяцев назад +1

      I imagine source map lookup only happens when you try to print a stacktrace, not when you throw or catch.

  • @ryangraham2969
    @ryangraham2969 8 месяцев назад +6

    I wonder if the bun v1 release was to get more eyes on it (and zig) so that development can move even faster.
    So far I'm getting a lot of value from bun for typescript workspaces (since it doesnt need to transpile to run). Previously I'd been using nx, which would piss me off on a regular basis with all the problems it has.

    • @adlex1212
      @adlex1212 8 месяцев назад

      My theory is the vcs funding the company pushed for this release.

    • @VerhoevenSimon
      @VerhoevenSimon 8 месяцев назад

      One not unimportant aspect is the VC behind Bun, and they likely wanted to see something already.

    • @ryangraham2969
      @ryangraham2969 8 месяцев назад +3

      Yeah, VC influence makes a lot of sense here. Looking at the code/commits/issues that existed before a week ago, a 1.0 release seems completely inconsistent with how unstable the project is. It's the opposite of what rust devs would do.
      But in the grand scheme of things, it's probably better for them to release unstable code now. Since releases get people on the hype train, and could lead to contributions by large companies. So by version 4, it'll probably be production-ready.

  • @plauclair
    @plauclair 8 месяцев назад +2

    As someone who worked extensively on JSCore for a couple years, the tracing line issue is something that's been a thing for years. It's just not on the level of V8 based environments.

  • @boot-strapper
    @boot-strapper 8 месяцев назад +8

    I've found bun to be extremely fast. But yes I did run into 1 issue where drizzle couldnt intropsect an existing database, luckily thats a one and done kinda thing, so I just used node for that and then bun to actually run the app. It feel liks im using go or something, its just so fast. I love it.

    • @MaxCoplan
      @MaxCoplan 8 месяцев назад

      > It feel liks im using go or something, its just so fast. I love it.
      interesting. What part of it feels fast?

    • @strager_
      @strager_  8 месяцев назад +4

      Bun's command is 3 characters. Node.js's is 4 characters: 33% slower!

    • @boot-strapper
      @boot-strapper 8 месяцев назад

      @@MaxCoplan basically every command is instant.

    • @MaxCoplan
      @MaxCoplan 8 месяцев назад

      @@boot-strapper oh, I see. So it's just placebo affect then.

    • @boot-strapper
      @boot-strapper 8 месяцев назад +1

      @@MaxCoplan go use it. It’s faster, in every metric.

  • @MaxCoplan
    @MaxCoplan 8 месяцев назад +1

    Great video! When's the Deno review coming out?

    • @strager_
      @strager_  8 месяцев назад +1

      Tomorrow

  • @zeez7777
    @zeez7777 8 месяцев назад +14

    You're like one of the few devs that i actually trust on youtube. Others feel like youtubers first and developers last or something.

    • @diracspace5842
      @diracspace5842 8 месяцев назад +1

      Yeah, I’m just discovering his channel and it seems exactly like that. Although I’d love for him to give a little better explanation regarding his issues. Overall I liked his video

    • @MaxCoplan
      @MaxCoplan 8 месяцев назад

      don't trust anybody on the internet.

    • @zeez7777
      @zeez7777 8 месяцев назад

      @@codingsafari It just feels like they used to be developers at some point then switched to youtube and follow every trend but they never really program/build anything anymore.
      Their credentials may justify that but it feels a bit weird to me. It just seems like they care more about grabbing any quick views.
      Barely anyone takes the time to touch stuff at anything deeper than surface level and spreads bunch of marketing bs like that.

    • @programmer-network
      @programmer-network 8 месяцев назад

      @@zeez7777 As I always say to my viewers, colleagues and pretty much everyone: If you haven't used a specific technology in production, and faced the actual issues and benefits yourself, your opinion is useless.
      So yes, you are absolutely right. Content creators live of creating content. Majority don't code, they just watch other videos and replicate the same stuff in different words.

    • @vlc-cosplayer
      @vlc-cosplayer Месяц назад

      @@zeez7777 "It just seems like they care more about grabbing any quick views." It's a classic "tragedy of the commons" situation: one person starts acting in a selfish way, that's beneficial to them, but harmful to everyone else. Then, more and more people start acting in that selfish way, because short-term benefits are more appealing than long-term ones. Eventually, everyone is acting selfishly, and people wonder what happened, and why everything sucks now. Humans are still stuck at the "monke want many banana" stage, that's what happened. 💀

  • @dhkatz_
    @dhkatz_ 8 месяцев назад

    Excellent video! However the title makes a bit sad. We should maybe not use Bun in production for everything yet, but we SHOULD use bun generally in order to point out issues like some of the ones you mentioned. Oven has already showed they are committed to make improvements in performance in any way they can. I don't doubt that with the proper issues reported they will fix everything they can

    • @strager_
      @strager_  8 месяцев назад +2

      > we SHOULD use bun generally in order to point out issues like some of the ones you mentioned
      Most people should not use experimental technologies. Most people should be using established technologies to get work done.

  • @halo2bullseye922
    @halo2bullseye922 5 месяцев назад

    Thanks for this!

  • @LaughingOrange
    @LaughingOrange 8 месяцев назад

    I've heard that on MacOS copy-file creates a hard-link, so it actually doesn't copy the data on disk, only a pointer that doesn't allow the underlying data to be removed before the last pointer of that type is removed. That seems match what your results show.

    • @strager_
      @strager_  8 месяцев назад +1

      A hardlink makes a directory entry which is identical to the original. If you modify the data of one of the files, the other file also changes because they are the *same* file.
      A copyfile'd file makes the two files independent, but they share data on disk *if the data remains the same*. If either copy changes, disk usage for that changed part doubles. (This is APFS's copy-on-write feature.)

  • @Diamonddrake
    @Diamonddrake 8 месяцев назад +2

    I also tried bun with an existing medium sized project and had issues as some popular packages use private node apis that don’t exist in bun

    • @strager_
      @strager_  8 месяцев назад +1

      I didn't mention this in the video, but my app used an undocumented API: http.Response#writeHeader. It was an easy fix though: call writeHead instead.
      What usage of private Node.js APIs did you run into?

    • @Diamonddrake
      @Diamonddrake 8 месяцев назад +1

      @@strager_ the lib jsonpath uses module#_compile from node which was required by react-scrips from create-react-app that one of our 3 year old projects was bootstrapped with

  • @WolfrostWasTaken
    @WolfrostWasTaken 8 месяцев назад

    I think that Bun wants to be a "complete" solution to avoid using a lot of different dependencies. I tried to use it on a production project and ran into many issues as well.

  • @ayushgogna9732
    @ayushgogna9732 8 месяцев назад +2

    this is interesting i would also try pnpm instead of yarn at this point i think that would be pretty close.

    • @strager_
      @strager_  8 месяцев назад +1

      Based on other benchmarks I've seen, I doubt pnpm would be 'pretty close' to Bun's performance.

  • @daleryanaldover6545
    @daleryanaldover6545 8 месяцев назад +2

    I shall share this video for the rest of the world to see.

  • @json_bourne3812
    @json_bourne3812 8 месяцев назад +2

    I'm enjoying Bun for a NEW project, but switching an already-built application just hasn't felt worth my time for the small gain it would bring (especially compared to the time to switch)

  • @opensourcedev22
    @opensourcedev22 8 месяцев назад +4

    See Bun. See Bun run. See Bun --bun run . Oh , what fun👍

  • @funnymemes2440
    @funnymemes2440 8 месяцев назад +3

    This is one of the best comparison videos. All the other videos never talked about the other side of bun. Thank you so much for this

  • @nightrocks
    @nightrocks 8 месяцев назад +2

    That burp, was nice.

  • @RicardoSansores
    @RicardoSansores 8 месяцев назад

    Great video.🎉

  • @jarredsumner5983
    @jarredsumner5983 8 месяцев назад +38

    I haven’t seen a case where better-sqlite3 underperforms relative to bun:sqlite. Or where a Node.js test runner outperforms bun test. So I’d like to do some profiling and see what I learn.
    Our nodejs polyfills in general do not perform as well as the native implementations. Bun.serve() is a lot faster than node:http
    Note; at the time of writing I haven’t finished watching the video yet
    Edit: I see the code is linked in the description. I didn’t see it when I wrote this comment

    • @aykutakguen3498
      @aykutakguen3498 8 месяцев назад +3

      Good to see the creator of bun immedietly working on things and making bun better

    • @rahulphoen
      @rahulphoen 8 месяцев назад +4

      If bun is struggling - Jared and team will get it fixed. Very active, very focused on performance and very iterative

    • @gustavoviana5508
      @gustavoviana5508 8 месяцев назад +2

      I was just about to send you this vid on twitter lol. Nice work

    • @jarredsumner5983
      @jarredsumner5983 8 месяцев назад +21

      Small update: looks like the code is using lots of RegExp which is being interpreted instead of JIT’d. This is an area where Bun/JSC performs terribly right now. It’s something that needs to get fixed, but it won’t be easy.

    • @okage_
      @okage_ 8 месяцев назад

      @@jarredsumner5983 gl

  • @EvanBoldt
    @EvanBoldt 8 месяцев назад +6

    Really seems like they went as far as possible to optimize for serverless architecture at every point. Minimizing cold start time, cutting package install time, handling simple http connections as fast as possible.
    Slow RegEx is reason enough for me not to use it yet.

    • @spicynoodle7419
      @spicynoodle7419 8 месяцев назад +5

      Maybe you should write a proper parser instead of relying on regex for everything. Remember how Chrome 100 broke 99% of the web because everyone was parsing user-agents with regex?

    • @strager_
      @strager_  8 месяцев назад +4

      If JavaScript's manual string processing didn't suck so much, maybe people wouldn't use RegExp as much! xD

    • @json_bourne3812
      @json_bourne3812 8 месяцев назад

      When considering a large high-traffic application using serverless, it's very appealing indeed.

    • @phoenix-tt
      @phoenix-tt 8 месяцев назад

      I am skeptical about serverless due to the amount of memory Bun allocated in one of the graphs shown. Memory consumption and GC is a big problem for js on servers.
      Had to spend a great chunk of time optimizing SSR on my previous job so that it won't run out of memory under load.

  • @sable2x
    @sable2x 8 месяцев назад +2

    strager always has the best, in depth content. A shame about that comic-sans font he uses, I don't get how he does it LOL

  • @DimitriMoreira
    @DimitriMoreira 8 месяцев назад +1

    Skepticism is greatly needed at this time. I will say this however, how many times have you seen a 1.0 version of a program that works flawlessly? I can't remember when the last time I saw it or even if it did happen. So... let's remain skeptical but also hopeful and see how this turns out.

  • @nobir98
    @nobir98 8 месяцев назад

    I really liked the video and ending 17:52 😂. Could you do Deno vs Node similar like this one?

    • @strager_
      @strager_  8 месяцев назад

      I don't think there's enough interest in Deno vs Node.js. I also think that Deno excels in "soft" areas like editor integration, linting, formatting, benchmarking, etc. which aren't easily condensed into benchmark numbers.

  • @connorallen162
    @connorallen162 8 месяцев назад +1

    @5:08 Bun accomplishes super fast no-op installs by cacheing some stuff and by skipping the the network check where it ensures with the NPM registry that your current versions are actually the latest. So this is an Apples to oranges comparison, Bun is missing a pretty important feature

    • @strager_
      @strager_  8 месяцев назад

      > skipping the the network check
      Yarn does the same thing, right?

    • @connorallen162
      @connorallen162 8 месяцев назад

      TBH I was just repeating what I heard in this video - ruclips.net/video/1xoy8Q5o8ws/видео.html&ab_channel=Theo-t3%E2%80%A4gg
      I'm not 100% sure the ins-and-outs of when and whether cached values are checked against the registry for npm and yarn but it sounds like Bun does less network checks
      @@strager_

  • @TheBlackManMythLegend
    @TheBlackManMythLegend 8 месяцев назад

    pushed the like button for the last burp( what a dedication to make funny content ) unironically

    • @strager_
      @strager_  8 месяцев назад

      For the whole video I was holding that burp in.

  • @carloss3028
    @carloss3028 7 месяцев назад

    Good job 👍

  • @nadzhafox
    @nadzhafox 8 месяцев назад +1

    Finaly someone try this on real cases! I dont understand why bun already 1.0 but roadmap is not completed

    • @MaxCoplan
      @MaxCoplan 8 месяцев назад +2

      You gotta ship it at some point. If you wait until it's perfect you'll never release anything.

  • @MadMathMike
    @MadMathMike 8 месяцев назад +2

    15:22 I about died hearing this tongue twister! 😂

  • @EmperorShang
    @EmperorShang 8 месяцев назад +1

    I'm always skeptical when a new product claims to be too good to be true. Good to see that in practice it is more complicated - sure it's better for some things but average or worse for other things. Gotta take everything with a grain of salt or "trust but verify"

  • @keithharvey633
    @keithharvey633 8 месяцев назад +1

    To my understanding, when "no work" is done, yarn will check tags like @latest to see if they have updates. Bun does not.
    On installations, bun creates symlinks rather than copying the files.

    • @MaxCoplan
      @MaxCoplan 8 месяцев назад

      I know pnpm hardlinks node_modules

    • @strager_
      @strager_  8 месяцев назад +2

      > yarn will check tags like @latest to see if they have updates.
      I don't use @latest though.
      > bun creates symlinks rather than copying the files.
      No, it doesn't. You can verify this yourself. (You can opt into symlinking with --backend=symlink, and Bun does symlink in some rare cases, but most dependencies will not symlink.)
      I don't know where this incorrect information came from, but I see it a lot.

  • @nurettinsen473
    @nurettinsen473 8 месяцев назад

    To make this replace Node.js, it requires a lot of effort. How can we create a clean architecture for this? Can we build a good structure with the backend libraries it provides like NestJS? I've tried briefly, but I didn't quite like it.

    • @strager_
      @strager_  8 месяцев назад +3

      > How can we create a clean architecture for this?
      You mean like what Deno tried?
      > Can we build a good structure with the backend libraries it provides like NestJS?
      This is such a JavaScripter thing to say.

  • @TheStringBreaker
    @TheStringBreaker 8 месяцев назад

    *Very nice!*

  • @forivall
    @forivall 8 месяцев назад

    I imagine that the readdir results in bun is returning the results in inode order. My cheap old 3d printer does the same sorting thing when listing files.

  • @Rex2k10
    @Rex2k10 8 месяцев назад +1

    Lack of disk usage on OS X is (probably) due to APFS and few others being copy-on-write, so a copy done the right way is free and instant. XFS is not COW but also can do this. Not sure about NTFS and EXT.

    • @strager_
      @strager_  8 месяцев назад

      Correct. Bun's default install strategy on macOS uses copyfile. People mistook this to mean non-CoW copies.

    • @Rex2k10
      @Rex2k10 8 месяцев назад +1

      @@strager_ From my own experience many people don't know what COW, sparse files, xattr (or even hardlinks) are. That's all fine, but when those people make big claims that's.. eh. I saw two videos from same person, first said Bun copies files on MAC, second said that it doesn't, but also said that "on Linux it uses bash feature called symlinks" but "since symlinks are slow on MAC" (it might be true, but rest of the statements make me doubt it) it uses "cloning" which is a "Unix specific" feature that "shouldn't be used often" (I just rewatched the video to double check).