4 ms·
I'm curious about where all that performance comes from I know it uses the WebKit JS runtime instead of V8, which is super interesting. Does that cause a perfo
by brundolf 4y ago
I'm curious about where all that performance comes from
I know it uses the WebKit JS runtime instead of V8, which is super interesting. Does that cause a performance lift? Or is there some other secret sauce that pervades throughout Bun? Or is it just a matter of Jarred giving lots of attention to spot-optimizing the most important bottlenecks outside of the core runtime?
- brrrrrm 4y agoI suspect it’s the latter. I would guess V8 with a thin wrapper and a ton of effort from someone who cares about perf to port all the native goodies of node would get similar wins.
- cheeselip420 4y agoGood thing Cloudflare is open-sourcing their V8-based Workers runtime soon.
- deleted 4y ago[deleted]
- ricardobeat 4y agoAbsolutely. And it has been done already, JustJS[1] has made it to the top 10 fastest in the TechEmpower benchmarks. It’s Linux only though, and not nearly as complete or easy to use, which makes it unappealing for real world projects. [1] https://github.com/just-js/just https://github.com/just-js/just
- Jarred 4y agoThere's no secret sauce Just lots of time spent profiling and trying things On the runtime side, JavaScriptCore/WebKit's team are extremely receptive to feedback, especially performance-related. Today, @Constellation made `Promise.all` about 30% faster https://github.com/WebKit/WebKit/pull/3569 https://github.com/WebKit/WebKit/pull/3569
- vips7L 4y agoHave you done any comparisons with Graal’s NodeJS runtime?
- nicoburns 4y agoIt's worth noting that most of Node's API are written in JavaScript, and often not particularly optimised JavaScript (sometimes constrained by API compatibility). I think bun is taking the approach of implementing a lot of core APIs in zig.
- brundolf 4y agoThat's surprising, I didn't know that about Node