NoFOMO
搜索 中EN 登录 注册

最高第 3 名 现在第 5 名

论语言性能基准偏差

开发者称语言性能对比常因次优代码而严重失真,多数基准无用,需懂语言与硬件才能写出极限性能代码。

名次变化

要点

  • @theredpix 为测试发布了一个 C++ 版本,并称其比 @axeng200 改进后的 C# 版本快 1.78 倍。
  • @theredpix 表示,信息流中称 C# 比 C++/C 更快的帖子让其有些恼火。
  • @SebAaltonen 认为语言性能对比往往存在严重偏差,且大多数基准测试的代码不够优化,因而毫无用处。

要点和反应摘要由 AI 依据本页推文整理,请以原推为准。 我们怎么用 AI

原推

Sebastian Aaltonen @SebAaltonen 6万 粉丝

Language performance comparisons are often heavily biased. So easy to make 10x+ slower code on pretty much every language. Have to understand the language and the hardware to make speed-of-light code. Most benchmarks have sub-optimal code, making them useless.引用 @theredpix: Actually, it should be #cpp I read some posts on my feed saying that C# was faster than C++/C. It got me a little annoyed. So decided to pop a proper C++ version for the test; here are the results: The C++ implementation here is 1.78x faster than the improved C# one by @axeng200 #programming #csharp #gamedev #screenshotSaturday #ComputerScience
191点赞 12转发 17回复 8,381浏览

在 X 上查看 收藏

讨论 0

还没有人讨论,来说第一句。

推荐信源

觉得我们漏了哪个一手信源,或者该关注什么话题?告诉我们。审核通过后,所有人的榜单都会覆盖到它。

@用户名,或者主页链接