In his announcement on Twitter, former Stripe frontend engineer Sumner advertises some self-run benchmarks intended to document Bun’s performance in comparison to Node and Deno. When rendering React on the server side, Bund processes about three times more http requests per second than Node, and almost four times more than Deno. Bun achieves a similar lead with queries in larger database tables.
bun:ffi (foreign function interface) call.
Focus on simplicity and more speed
Relying on Zig for the development of Bun, a language currently in version 0.9.1 also still in an early stage, is justified by Sumner with the advantages of its manual low-level memory control and the lack of a “hidden control flow”. This would make it easier for developers to write fast software. On the other hand, they have to do without memory security like with Rust.
More information about Bun can be found on the project website and in the repo on GitHub. Bun is currently available for Linux, macOS and Windows Subsystem for Linux.