3 ms·
When talking about JavaScript performance, aren't we essentially comparing Bun to V8? If so, wouldn't it be very hard to beat V8's performance, given that ther
by endorphine 4y ago
When talking about JavaScript performance, aren't we essentially comparing Bun to V8?
If so, wouldn't it be very hard to beat V8's performance, given that there has been so much engineering effort for many years towards making it fast?
Or are we taking into account the speed of the package managers and bundlers as well?
Disclaimer: I haven't saw the benchmarks, if any.
- xtian 4y agoBenchmarks are shown on the project’s homepage
- jesse__ 4y agoIt's _mostly_ talking about the speed of the surrounding tools. They wrote a package manager that speaks NPM (presumably in C++ or zig instead of JS) which unsurprisingly completely dominates NPM in performance. The other stuff he benches is built into the runtime ... HTTP requests, copying files, and a webserver Bun ships with. Presumably the Bun team wrote these tools with performance in mind, but the article doesn't compare features. I'm skeptical the webserver in particular is at feature parity with the ones he benched against, which makes the numbers look pretty watery to me. It does not address the runtimes of JavaScriptCore (Webkit/Bun) vs V8 (node/deno) which, as you pointed out, are probably very similar.
- senttoschool 4y ago>When talking about JavaScript performance, aren't we essentially comparing Bun to V8? Bun is powered by JavascriptCore which is webkit. Webkit is developed by Apple. Safari typically outperforms Chrome on benchmarks.
- ksbrooksjr 4y agoFor the simplest benchmarks the performance disparity might come down to the difference between JavaScriptCore (which Bun uses) and V8 (which Node uses), but for anything non-trivial there's a significant amount of overhead introduced by the Node runtime. Someone wrote a barebones V8 wrapper called Just Js, which is based on V8 just like Node, but it crushed Node in the Techempower benchmarks [1]. [1] https://www.techempower.com/benchmarks/#section=data-r21&test=plaintext https://www.techempower.com/benchmarks/#section=data-r21&tes...