Express is one of the most popular Node.js web frameworks on npm. There are plenty of benchmarks comparing Express to alternative frameworks, but we couldn’t find a clean comparison of Express 4 vs Express 5, so we decided to test it ourselves.
This Express 4 vs Express 5 benchmark compares requests per second (rps) across:
- Node Versions: 18.20.8, 20.19.6, 22.21.1, 24.12.0
- Express Versions: 4.18.2, 4.22.1, 5.0.0, 5.1.0, 5.2.1
Ping (GET /ping)
This is the simplest possible case. A single route returning a small response with no application-level logic.
Middleware x50 (GET /ping)
This test introduces 50 synchronous middleware functions before reaching the handler.
JSON body ~50 KB (POST /json)
This test measures JSON parsing and request body handling using a payload of approximately 50 KB.
Response payload 100 KB (GET /payload)
This scenario measures throughput when sending a larger response body.
How the Tests Were Performed
We measured each test 5 times and averaged the result. We let the Mac cool down for a full hour before running the benchmark again.
- Hardware: Apple M4, 10 cores, macOS 25.0.0 (arm64)
- Tooling: Autocannon 7.15.0
Conclusion
Across all tested Node versions and scenarios, Express 5 is consistently slower than Express 4 in raw throughput. The difference is not dramatic, but it is noticeable and repeatable, especially on lightweight routes and middleware-heavy setups.
For larger payloads and JSON-heavy endpoints, the gap narrows and in some cases nearly disappears. But if your workload is dominated by small responses or deep middleware chains, Express 4 still delivers higher requests per second.
Upgrading to Express 5 is therefore a trade off. You gain newer behavior and long-term maintenance, but at the cost of lower peak throughput compared to Express 4.