Node.js is still way faster than Deno

Newly released Deno 1.9 promises “Rust-like” performance, still outrun by Node.js

uNetworking AB
3 min readApr 15, 2021

There is no incentive swapping to Deno, especially not from Node.js. Node.js has history and is not exactly a performance beast on its own, but it does have strong support for native add-ons. These can seamlessly augment and boost Node.js to heights way above what is possible with Deno.

Above simple bar chart plots the new web I/O performance of Deno 1.9. With this new release, Deno is finally utilizing the Rust-written “Hyper” — a native HTTP server built for speed. This finally brings a big boost over the prior, scripted-and-sluggish, HTTP server built on Deno’s own TypeScript APIs.

However, as we can clearly see the end result is still very poor compared to what we have had with Node.js for many years already. Node.js being a mature platform with good support for fast native add-ons, still outruns Deno 1.9 with ease and big margins.

Further on, in this test we are utilizing a full URL router for the Node.js test case, while the Deno 1.9 case is just a minimal server without any routing whatsoever. One can say that we are inviting Deno 1.9 to score, but all it does is stumble on the ball and fall flat on its face.

The main problem with Deno is that it does exactly the same as Node.js, worse or similarly bad. Both platforms are still mainly the same; V8 and scripting. There is no big incentive for a swap other than pointless hype. The same hype Node.js had many years ago. Your apps and services aren’t going to get “Rust-like performance” with Deno, it’s just complete nonsense.

Guess what? If you want “Rust-like performance” then….. write Rust code? You’re not going to get it with Deno, I can tell you that for sure.

Q&A

  • “you aren’t using WebSockets specifically but instead using the uWebSocket.js library which also supports HTTP (that could really use some clarification).”
    Right, “uWebSockets.js” is a library doing both HTTP and WebSockets. This comparative test is on HTTP, since HTTP performance is what Deno 1.9 boasts about.
  • “You are such a bad reader” […] “performance boost that Deno got this release is happening ONLY in HTTP” […] “you are comparing WebSocket implementations”
    I am comparing HTTP. Irony.
  • “It’s hilarious how you’re comparing a _native_ impl to one written in Javascript, and the native one _only_ performs twice as fast as Deno’s JS impl”
    Deno 1.9 uses a native Rust-written HTTP server called “Hyper”, not a scripted one. That’s the whole point of this post.
  • “I have found my way into a fanboy vs fanboy fight”
    Node.js is a piece of garbage platform. But that doesn’t mean I cannot perform scientific tests involving it.
  • “Are you a 12 year old sufferer of ADHD with too much free time and a trickle of mom & dad’s money to keep you out of their hair, or something? You write — and then copy responses back into the edited body of your post — like old people fuck.”
    Correctamente.

--

--