Daniel Lemire's blog

, 4 min read

A simple WebSocket benchmark in JavaScript: Node.js versus Bun

6 thoughts on “A simple WebSocket benchmark in JavaScript: Node.js versus Bun”

  1. Devdev says:

    That’s the dumbest article I’ve read this week, you haven’t shown your test data, your test code, the transmission between client -server and worst of all, you haven’t shared your configuration of servers/dockers/kubernetes

    Articles like those are cancer for dev community.

    1. The link is in the blog post. It points at https://github.com/lemire/jswebsocket_bench

    2. Alex says:

      Why is there so much anger in your comment?

  2. Rusty says:

    Was initially interested in this article but upon looking at code I see is using ws npm package for both runtimes. If using Bun you’d want to use the natively supported websocket server (no dependencies required). It might also be interesting to use the included websocket clients that both Bun the latest node.js release salso has

  3. Juho Vepsäläinen says:

    It would be interesting to see how Deno fares.

    I would expect it to be perhaps somewhere between Node and Bun although it could be slower than Node. At least in the beginning they weren’t focused on performance although that may have changed.

  4. Nedgeva says:

    Obviously uWebSockets is missing from perf comparison, especially in light where Bun with it’s very own ws implementation outshines node’s one.