DO NOT USE BUN (bun install is good dough)

Поділитися
Вставка
  • Опубліковано 28 гру 2024

КОМЕНТАРІ • 518

  • @YandiBanyu
    @YandiBanyu Рік тому +752

    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 Рік тому +15

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

    • @MaxCoplan
      @MaxCoplan Рік тому +9

      imagine a UA-cam video with _error bars_???!

    • @Microphunktv-jb3kj
      @Microphunktv-jb3kj Рік тому

      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_  Рік тому +22

      > 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

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

  • @wernersmidt3298
    @wernersmidt3298 Рік тому +706

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

    • @AndersonPEM
      @AndersonPEM Рік тому +44

      This... is just... BRILLIANT

    • @strager_
      @strager_  Рік тому +50

      I already have merch: strager.net/booty/

    • @shiftyjesusfish
      @shiftyjesusfish Рік тому +17

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

    • @Microphunktv-jb3kj
      @Microphunktv-jb3kj Рік тому

      Buntime, Funtime :D

    • @kyguypi
      @kyguypi Рік тому +14

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

  • @djSeakDigital
    @djSeakDigital Рік тому +124

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

  • @GoyimTekken
    @GoyimTekken 10 місяців тому +12

    I’m going to use bun and no one can stop me

  • @jdubz8173
    @jdubz8173 Рік тому +104

    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.

  • @FederalPandas
    @FederalPandas Рік тому +257

    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

  • @circusfreakRob
    @circusfreakRob Рік тому +63

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

  • @Wepper1
    @Wepper1 Рік тому +10

    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.

  • @CielMC
    @CielMC Рік тому +252

    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.

    • @PanosPitsi
      @PanosPitsi Рік тому +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 Рік тому +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 Рік тому +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

  • @LKD70
    @LKD70 Рік тому +35

    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

  • @trapfethen
    @trapfethen Рік тому +27

    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.

  • @blehbleh9283
    @blehbleh9283 Рік тому +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_  Рік тому +54

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

    • @ssmith5048
      @ssmith5048 Рік тому

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

    • @vaisakh_km
      @vaisakh_km Рік тому +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..

  • @xavhow
    @xavhow Рік тому +46

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

    • @MrEnsiferum77
      @MrEnsiferum77 Рік тому +2

      that's not the point of bun...

    • @xavhow
      @xavhow Рік тому +8

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

    • @PanosPitsi
      @PanosPitsi Рік тому

      @@xavhowahem demo 🥶

    • @xavhow
      @xavhow Рік тому

      @@PanosPitsi well, at least better than a lot of helloworlds out there.

    • @despareint
      @despareint Рік тому +1

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

  • @AlbertCloete
    @AlbertCloete Рік тому +15

    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 Рік тому +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...

  • @breytonpabst1009
    @breytonpabst1009 Рік тому +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.

  • @mcspud
    @mcspud Рік тому +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.

  • @elcontrastador
    @elcontrastador Рік тому +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

  • @zeez7777
    @zeez7777 Рік тому +15

    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 Рік тому +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 Рік тому

      don't trust anybody on the internet.

    • @zeez7777
      @zeez7777 Рік тому

      @@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 Рік тому

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

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

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

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

  • @godnyx117
    @godnyx117 Рік тому +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 Рік тому

      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_  Рік тому +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: ua-cam.com/video/qAYFepR4GcE/v-deo.html
      Theo: ua-cam.com/video/Rp5yvwX7orE/v-deo.html

  • @quinn479
    @quinn479 Рік тому +5

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

  • @n.fejzic
    @n.fejzic Рік тому +4

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

  • @bryantaylor8504
    @bryantaylor8504 Рік тому +16

    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.

  • @ssmith5048
    @ssmith5048 Рік тому +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.

  • @ivanjermakov
    @ivanjermakov Рік тому +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_  Рік тому +12

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

    • @follantic
      @follantic Рік тому

      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.

  • @jarredsumner5983
    @jarredsumner5983 Рік тому +37

    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 Рік тому +3

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

    • @rahulphoen
      @rahulphoen Рік тому +4

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

    • @gustavoviana5508
      @gustavoviana5508 Рік тому +2

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

    • @jarredsumner5983
      @jarredsumner5983 Рік тому +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_ Рік тому

      @@jarredsumner5983 gl

  • @xfreeman86
    @xfreeman86 Рік тому +1

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

  • @thenwhoami
    @thenwhoami Рік тому +10

    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 Рік тому +6

      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 Рік тому +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 Рік тому

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

  • @Sebastian-hg3xc
    @Sebastian-hg3xc Рік тому +8

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

  • @nzuzomal4545
    @nzuzomal4545 Рік тому +1

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

  • @isaac8228
    @isaac8228 Рік тому +5

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

  • @pairofrooks
    @pairofrooks Рік тому +6

    "Feels like this feature is immature."
    No sir, this feature is.... half-baked.
    THANK YOU, THANK YOU, I'LL BE HERE ALL WEEK!

    • @strager_
      @strager_  Рік тому +1

      Oh, that's a good one!

  • @LukasSkywalker_
    @LukasSkywalker_ Рік тому +2

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

  • @_modiX
    @_modiX Рік тому +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`?

  • @boot-strapper
    @boot-strapper Рік тому +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 Рік тому

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

    • @strager_
      @strager_  Рік тому +4

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

    • @boot-strapper
      @boot-strapper Рік тому

      @@MaxCoplan basically every command is instant.

    • @MaxCoplan
      @MaxCoplan Рік тому

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

    • @boot-strapper
      @boot-strapper Рік тому +1

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

  • @mrvectorhc7348
    @mrvectorhc7348 Рік тому +1

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

  • @JeremyChone
    @JeremyChone Рік тому +3

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

  • @connorallen162
    @connorallen162 Рік тому +2

    @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_  Рік тому

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

    • @connorallen162
      @connorallen162 Рік тому

      TBH I was just repeating what I heard in this video - ua-cam.com/video/1xoy8Q5o8ws/v-deo.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_

  • @masmullin
    @masmullin Рік тому +2

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

  • @0netom
    @0netom Рік тому +1

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

  • @annaczgli2983
    @annaczgli2983 Рік тому +5

    0:04 There. Right there. That is why I respect your content. Actual testing, & not lazy reaction content. Thank you 🙏

  • @Saitanen
    @Saitanen 10 місяців тому

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

  • @VideoGameBoxReviews
    @VideoGameBoxReviews Рік тому +2

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

  • @DevR00ts
    @DevR00ts Рік тому

    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!

  • @funnymemes2440
    @funnymemes2440 Рік тому +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

  • @ryangraham2969
    @ryangraham2969 Рік тому +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 Рік тому

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

    • @VerhoevenSimon
      @VerhoevenSimon Рік тому

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

    • @ryangraham2969
      @ryangraham2969 Рік тому +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.

  • @itsbadrabbit716
    @itsbadrabbit716 Рік тому +1

    This is awesome, thanks for sharing, Strager!

  • @EvanBoldt
    @EvanBoldt Рік тому +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 Рік тому +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_  Рік тому +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 Рік тому

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

    • @phoenix-tt
      @phoenix-tt Рік тому

      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.

  • @DimitriMoreira
    @DimitriMoreira Рік тому +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.

  • @doovel
    @doovel Рік тому

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

  • @MaxCoplan
    @MaxCoplan Рік тому +1

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

  • @CoDEmanX47
    @CoDEmanX47 Рік тому +2

    Fake it till you bake it?

  • @JoRyGu
    @JoRyGu Рік тому +5

    Is this a UA-camr 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.

  • @jonton6981
    @jonton6981 Рік тому

    Thank you for adding error bars in a benchmark comparison.

  • @Kotfluegel
    @Kotfluegel Рік тому +1

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

  • @combinio9533
    @combinio9533 Рік тому +2

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

  • @opensourcedev22
    @opensourcedev22 Рік тому +4

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

  • @Dacas5
    @Dacas5 Рік тому +2

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

  • @orderandchaos_at_work
    @orderandchaos_at_work Рік тому

    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.

  • @daleryanaldover6545
    @daleryanaldover6545 Рік тому +2

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

  • @json_bourne3812
    @json_bourne3812 Рік тому +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)

  • @RemotHuman
    @RemotHuman Рік тому +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

  • @Raynhardx
    @Raynhardx Рік тому +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_  Рік тому +1

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

  • @nightrocks
    @nightrocks Рік тому +2

    That burp, was nice.

  • @swerber
    @swerber 9 місяців тому +1

    Does Bun 1.1 fix any of these issues?

  • @canepaper967
    @canepaper967 Рік тому +6

    I will continue using regular node unless I had a very good reason to switch to a different runtime for performance reasons. If it's not broken you shouldn't attempt to fix it. However I do think having more competition within the space of runtimes is good for the ecosystem as a whole, just like how improvements made in yarn were adopted in npm, competition is always a good thing.

    • @strager_
      @strager_  Рік тому +8

      > If it's not broken you shouldn't attempt to fix it.
      This is my mindset as well. 👍
      > However I do think having more competition within the space of runtimes is good for the ecosystem as a whole
      ❤️ You and I are on the same wavelength.

  • @yyydollars8456
    @yyydollars8456 Рік тому +7

    Best tech content creator, at least in web dev

  • @mac_edmarco
    @mac_edmarco Рік тому +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

  • @bagfleet
    @bagfleet Рік тому +1

    Great down to earth video!

  • @AV_YOUTUBE_202X
    @AV_YOUTUBE_202X Рік тому

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

  • @juanmacias5922
    @juanmacias5922 Рік тому

    These were great benchmarks, thanks for sharing!

  • @keithharvey633
    @keithharvey633 Рік тому +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 Рік тому

      I know pnpm hardlinks node_modules

    • @strager_
      @strager_  Рік тому +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.

  • @GamBar64
    @GamBar64 6 місяців тому

    Great video, thank you for taking the time to do all this research

  • @toffeethedev
    @toffeethedev Рік тому +6

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

  • @R4ngeR4pidz
    @R4ngeR4pidz Рік тому +4

    I'd say relying on undefined behavior (9:30) is not a problem with Bun, it's a user issue
    For example if in c++ I rely on the order of an `unordered_set`, I'd get burned when I run the same code on different OSes with different implementations

    • @strager_
      @strager_  Рік тому +3

      > I'd say relying on undefined behavior (9:30) is not a problem with Bun, it's a user issue
      Did you mean 9:02? I said "Another minor issue (which is also my fault)". I was blaming myself, not Bun.
      However, Hyrum's Law suggests that, despite our best intentions, mistakes like this will appear in codebases and will make porting to Bun more difficult. I thought an example of this was worth mentioning in the video.

  • @Diamonddrake
    @Diamonddrake Рік тому +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_  Рік тому +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 Рік тому +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

  • @primenumberbuster404
    @primenumberbuster404 Рік тому +1

    WE NEED 3 MORE VERSIONS TO MAKE IT USABLE FOR BIGGER OPTIMIZATIONS.

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

    Someone explained that when you install dependencies Bun basically ignores @latest and just serves up the version you have already installed previously. So if you don't clear out the cache it's fast but kind of bad.

  • @turolretar
    @turolretar Рік тому

    I tried using bun and it didn’t work out at all, it felt like my arms were cut off

  • @thegrumpydeveloper
    @thegrumpydeveloper Рік тому +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_  Рік тому

      Agreed. Let other people take the risks! xD

  • @ItzAnameOk
    @ItzAnameOk Рік тому +1

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

  • @nadzhafox
    @nadzhafox Рік тому +1

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

    • @MaxCoplan
      @MaxCoplan Рік тому +2

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

  • @khashe
    @khashe Рік тому

    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.

  • @ericng8807
    @ericng8807 Рік тому +2

    How did you make all those bun puns while keeping a straight face

    • @strager_
      @strager_  Рік тому +1

      I am not fun at parties.

  • @evilrobotpenguin
    @evilrobotpenguin 8 місяців тому

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

  • @Fanaro
    @Fanaro Рік тому +1

    What do you use to display the graphs on video?

    • @strager_
      @strager_  Рік тому +2

      The animated graphs were custom built using Motion Canvas: motioncanvas.io/
      The memory usage line chart was made with Microsoft Excel.

    • @Fanaro
      @Fanaro Рік тому

      @@strager_ Thanks! Please do add that to the description of your videos!

    • @Fanaro
      @Fanaro Рік тому

      @@strager_ Would you mind sharing the code for the graphs at some point?

  • @hnccox
    @hnccox Рік тому +1

    What I learned is with package installs, yarn actually does check if it's the correct package, while bun just blindly references it's cache. Hence the time difference.

    • @strager_
      @strager_  Рік тому

      What makes you think that Yarn checks npm?

  • @ProfessionalBirdWatcher
    @ProfessionalBirdWatcher Рік тому +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"

  • @DeanHerbertMooCow
    @DeanHerbertMooCow Рік тому

    really cool analysis, thanks strager

  • @_thehunter_
    @_thehunter_ Рік тому +3

    someone should send this video to jared

  • @casraf
    @casraf Рік тому

    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

  • @MadMathMike
    @MadMathMike Рік тому +2

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

  • @davidmoll7250
    @davidmoll7250 Рік тому

    I do wonder where the difference between your report on the speed of the sqlite-features and the one from bun are coming from. Why are theirs so fast while yours are slower than bettersqlite with Node?

    • @strager_
      @strager_  Рік тому

      I didn't debug that performance difference. Bun's profiler was broken (as I mentioned in the video) and I had a bunch of other things to investigate too.

  • @prhasn
    @prhasn Рік тому

    Excellent breakdown. Thanks for sharing this.

  • @norliegh
    @norliegh Рік тому +2

    "in my case bun run doesn't run bun, but bun runs bun" 😂

    • @MaxCoplan
      @MaxCoplan Рік тому

      you got it wrong. bun run doesn't run bun bun bun run runs bun

  • @gordonjohnston8321
    @gordonjohnston8321 Рік тому +4

    Finally some sanity in the bun / node discussion. Thank you,

  • @cameronstroebel3333
    @cameronstroebel3333 Рік тому

    Very informative, thank you for sharing!

  • @ayushgogna9732
    @ayushgogna9732 Рік тому +2

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

    • @strager_
      @strager_  Рік тому +1

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

  • @EvgenyBobkin
    @EvgenyBobkin Рік тому

    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_  Рік тому

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

    • @strager_
      @strager_  Рік тому

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

  • @pawan29121991
    @pawan29121991 Рік тому

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