3 ms·
Weird, I just ran some benchmarks with bun a few days ago for my own purposes, and I concluded that their marketing slogan was bs and Node was faster. However,
by klabb3 4y ago
Weird, I just ran some benchmarks with bun a few days ago for my own purposes, and I concluded that their marketing slogan was bs and Node was faster.
However, I did it again with this example and Bun is indeed significantly faster
- 15.1k inserts/s with `uuid` and `Date.toUTCString()`
- 20k inserts/s with faking uuid and date (generated unique strings)
Bun is now scientifically at the Rust level of Web Scale, which is pretty crazy. I wonder how they do that, because it's still just v8 under the hood? Mayhaps their sqlite driver is faster.
- Jarred 4y agoWhat benchmark did you run where Node outperformed Bun? Happy to take a look. There are still "obvious" things we need to fix, like our EventEmitter implementation is currently around 3x slower than Node due to C++ <> JS callback overhead and several functions in node:crypto are still using JS-only polyfills intended for web browsers (instead of BoringSSL/OpenSSL).
- klabb3 4y ago> What benchmark did you run where Node outperformed Bun? It was a very similar SQLite bench but I may have done something wrong. > Happy to take a look. That’s ok but let me bait and switch you for this dead socket leak issue: https://github.com/oven-sh/bun/issues/1397 https://github.com/oven-sh/bun/issues/1397 In general, I’ve found that tons of projects suffer leaks. People don’t care about leaks :( (or alternative the tooling for discovering them kinda sucks)
- promiseofbeans 4y agoOne of their tricks is that Bun doesn't use Chrome's V8. Instead, they use Safari's JavascriptCore, which tends to be faster[citation needed].
- re-thc 4y agoThat's an important point but not likely the bulk of the issue (vs Node). Deno that uses V8 is also faster than Node. Node has a lot of other issues before we get to the Javascript engine part even.
- deleted 4y ago[deleted]
- sroussey 4y agoNot V8… it’s Apple’s JavaScript Core.