Benchmarks

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

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

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

Fastify

43172 req/sec (Check the code)

60.15494370750195%

Koa

35281 req/sec (Check the code)

49.159792665254706%

Express

10561 req/sec (Check the code)

14.71547207669156%

Restify

31797 req/sec (Check the code)

44.30526139783748%

Hapi

30371 req/sec (Check the code)

42.318303422138%

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

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