知道这个问题几年了,一直没有发声。 go 社区的一些文章、帖子、评论,隔三差五就有新的内容传播这些错误的性能结论。 我喜欢 go 但是从不乱吹,例如对于性能的事实:如果都是功能完备、良好优化的框架,go 的框架不可能比 c/cpp/rust 框架性能更好。
绝大多数开发者不会去阅读下这些得到不切实际性能结论的框架的测试代码是否合理。不只是国内开发者,老外开发者也一样,只看结论、人云亦云,甚至跟着一块传播。而且刚刚看到个 10w 订阅的老外 youtub up 主,做了视频去传播这些错误结论、没有对不切实际的性能框架做任何检验。
技术应该真实、客观,所以开了个 issue 发发声,建议这种社区影响力比较大的性能测试项目不要搞这些假测试,而是尽量提供真实、公平、公正的数据: https://github.com/TechEmpower/FrameworkBenchmarks/issues/9916
issue 内容也记录在这里:
To avoid misleading: frameworks that do not implement basic HTTP functions should be removed #9916
Thanks to TechEmpower for providing the community with so many language/framework performance test results, which bring great reference value to everyone.
Some frameworks are just 4th-layer frameworks(for TCP/UDP/UnixSocket...), which implement simple HTTP "\r\n" judgment to perform a request parsing, and then write back the HTTP response buffer. They do not have the basic conditions for being a production environment HTTP service, but they participated in this test and got a high/top performance results.
Many users in the community do not really read the test code of these frameworks, so they do not know the truth, which causes a lot of miscommunication, making users mistakenly believe that some frameworks or even languages can achieve unrealistic performance.
As a performance testing project with great influence, it should be fair and just, so I suggest removing these frameworks with incomplete functions.
If you want to test the 4th-layer performance of these not full-feature HTTP frameworks, you should open a separate test item/combination instead of comparing the 4th-layer framework(with fake HTTP implementation) with the HTTP framework.