Benchmarks

基于我们在 Node.js 性能方面的经验,Fastify 从一开始就奔着 尽可能快 的目标来构建的。

所有用于基准测试的代码都可以在 GitHub 上找到

以下是 Fastify 相对于其它著名的 Node.js web 框架的性能优势的简要总结:

Fastify

21671 req/sec (Check the code)

30.195909040240775%

Koa

19040 req/sec (Check the code)

26.529929773715306%

Express

5576 req/sec (Check the code)

7.769479433730911%

Restify

18342 req/sec (Check the code)

25.557351465834355%

Hapi

16039 req/sec (Check the code)

22.348400401293055%

请注意,这是一个综合的 “hello world” 基准测试,旨在评估框架开销。每个框架在应用程序上的开销取决于您的应用程序,如果性能对您很重要,您应该始终进行基准测试。

您想就我们的基准测试提供反馈吗? 在 Github 上提交一个 issue,我们就会回复您!