3 ms·
Can anyone speak to the performance numbers on the Bun page? It represents itself as significantly faster than the existing options, but why is that the case?
by sausagefeet 2y ago
Can anyone speak to the performance numbers on the Bun page? It represents itself as significantly faster than the existing options, but why is that the case? Is it related to Bun itself? It must be the JavaScript engine they chose right? My understanding is it uses the Safari one rather than V8. Is JSC really that much faster? If so, what are the trade-offs of choosing that over V8 or any other option?
- pansa2 2y ago> My understanding is it uses the Safari [JavaScript engine] rather than V8 Looks like you’re right. Thanks for clearing up my misunderstanding: I’m not sure why, but I thought Bun was using a custom JS implementation.
- DanielHB 2y agoFrom their docs it is "written in zig" which implies "all of it is Zig". They don't hide that they use JSC but they don't like to advertise either. It is a bit manipulative advertising to draw hype people in I would say. You know those tech influencers who like to peddle stuff to get views. edit: I was a bit unfair, it feels like those "hype tech influencers" are the ones who downplay JSC in favor of promoting Zig, not the project itself. The frontpage of Bun mentions JSC twice and Zig once.
- intelVISA 2y agoWell in their defense it would hard to get funding for JavaScriptCoreWrapper.sh so it's a useful misunderstanding to curate.
- nicoburns 2y ago> Is JSC really that much faster I think it is a bit faster. But a lot of Bun's speed comes from implementing API's in Zig rather than JS (which node does a lot)
- rob74 2y agoIt's surprisingly hard to find an answer to this (an FAQ on the Bun site would be a good idea?), but I suspect it has to do with reimplementing some stuff (bundler, package manager, test runner etc.) in a compiled language (Zig) rather than using the JS runtime for everything (this is probably also the reason why Bun integrates so many functions into one "kitchen-sink" executable), and using a JS runtime which is faster than V8 at least in some regards.