Benchmark 2025: JavaScript (Node.js) vs Competitors — Who Is Faster?
The developer community has traditionally been divided into two camps: some consider Node.js a slow "toy" language, while others see it as an industry standard for backend. To dispel the myths, the PythonLib team conducted a series of tests in early 2025. The participants were: Node.js 22, Go 1.23, Rust 1.80, Python 3.13, and Java 21 (GraalVM).
Testing was performed on a server with AMD EPYC 9654 (96 cores), 256 GB DDR5, and NVMe SSD. Three scenarios were used:
- HTTP server (100k requests with keep-alive, JSON response)
- Computations (generating 10 million prime numbers)
- Database operations (100k SELECT + INSERT in PostgreSQL)
Results: Who Leads?
In the HTTP server scenario, Node.js achieved 98,000 req/s, second only to Rust (126,000) and Go (112,000). Java and Python rounded out the list with 85,000 and 32,000 respectively. Node.js's secret is its asynchronous event loop and fast V8 engine.
In the computational test, the picture changed: Rust (1.2 sec) and Go (1.8 sec) crushed Node.js (4.5 sec). Python scored 12.3 sec. However, Node.js made up ground in I/O operations: file and network operations were 15% faster than Go.
Why Node.js Is Not "Slow"?
Many criticize JavaScript for being single-threaded, but in 2025, Worker Threads and clustering allow utilizing all CPU cores. In the PostgreSQL test, Node.js (with the pg-pool driver) processed 89,000 operations/sec — almost as much as Go (93,000). Python with asyncpg managed only 41,000.
- Node.js's main advantage is the npm ecosystem and development speed. Rust and Go are faster, but writing microservices in them takes 2-3 times longer.
- Where Node.js is weak? Heavy CPU-bound tasks are better offloaded to Rust via FFI or WebAssembly.
- Trend for 2025 — hybrid architectures: Node.js for APIs and BFF, Rust for critical computations.
Benchmark Summary
If you need a fast prototype or high-load I/O — Node.js remains the best choice. For low-latency financial systems, choose Rust. Go is the sweet spot between speed and simplicity. Python is still good for ML backends, but not for production workloads.
Full test data and source code are available in our GitHub repository. Stay tuned for updates on PythonLib — we continue testing new versions of languages and libraries.