logoalt Hacker News

kaysontoday at 3:01 PM1 replyview on HN

It's surprising to me that bun is so much faster serving web requests. The article mentions Zig as a factor, but is micromanaging memory really gaining over 2x vs node?

Similarly, it seems, though they didnt exactly say, that they're running bun with a warm package cache... What about the others? Do they have caches?


Replies

klooptoday at 3:08 PM

> The article mentions Zig as a factor, but is micromanaging memory really gaining over 2x vs node?

As someone who has optimized by reducing/batching heap allocations, 2x seems within the realm of possibility, depending on the exact circumstances.

That being said, iirc, node also has more hooks for things like observability than bun does, which might hurt it here