node.js is "written" in C++; apparently that is not easy to maintain
node creator then created Deno, in Rust language. It is faster?
Go language is written in Go (after bootstrap). Clever. And it is fast. Faster than node.js
Bun.js is optimized for performance, and written in new-ish language Zig, much simpler than C++
And now there is apparently one more contender, "Nim" language,
making even faster web servers...
A "brave new world" of new programming languages! Good!
Web server ‘hello world’ benchmark : Go vs Node.js vs Nim vs Bun – Daniel Lemire's blog
result indicates that Nim is doing quite well on this toy example.
system | requests/second (10 connections) | requests/second (1000 connections) |
---|---|---|
Nim 2.0 and httpbeast | 315,000 +/- 18,000 | 350,000 +/- 60,000 |
GCC12 (C++) + lithium | 190,000 +/- 60,000 | 385,000 +/- 80,000 |
Go 1.19 | 95,000 +/- 30,000 | 250,000 +/- 45,000 |
Node.js 20 and uWebSockets.js | 100,000 +/- 25,000 | 100,000 +/- 35,000 |
Bun 1.04 | 80,000 +/- 15,000 | 65,000 +/- 20,000 |
Node.js 20 (JavaScript) | 45,000 +/- 7,000 | 41,000 +/- 10,000 |
Bun + fastify | 40,000 +/- 6,000 | 35,000 +/- 9,000 |
*Jarred Sumner, the author of Bun, said on X that fastify is not fast in bun right now but that Bun.serve() is more than twice faster than node:http in bun.
Go and Node.js Comparison: Scalability, Performance, Tools
what is Nim?
Nim is a statically typed compiled systems programming language.
It combines successful concepts from mature languages like Python, Ada and Modula.
No comments:
Post a Comment