Go语言基准测试?

huangapple go评论148阅读模式
英文:

Go language benchmarks?

问题

我看到有人声称Go的速度几乎可以与C相媲美,但是否已经有任何可用的基准测试呢?

英文:

I see the claims that Go is supposed to be almost comparable in speed to C, but are there any benchmarks available yet?

答案1

得分: 31

Go已经被添加到计算机语言基准测试游戏中。与C++相比,它还有很长的路要走。

2009年11月:

Go语言基准测试?
<sub>(来源: debian.org)</sub>

2011年10月:

Go语言基准测试?
<sub>(来源: debian.org)</sub>

英文:

Go is added to the Computer Language Benchmarks Game. In comparison to C++ it has still a way to go.

November 2009:

Go语言基准测试?
<sub>(source: debian.org)</sub>

October 2011:

Go语言基准测试?
<sub>(source: debian.org)</sub>

答案2

得分: 15

在分发中有一个基准文件夹。请查看$GOROOT/test/bench

英文:

There is a benchmark folder in the distribution. Check out $GOROOT/test/bench.

答案3

得分: 7

文档内容很简略,充满了“也许将来我们会X”和“请关注此处以获取更多信息”的字眼。Go页面将语言参考列为最佳信息来源,这对我来说意味着这是一门初生的语言。我怀疑目前还没有任何已发布的基准测试。

英文:

The documentation is light and filled with "maybe someday we'll X" and "watch this space for more information." The Go page lists the language reference as the best single source for information, which to me says infant language. I doubt there are any published benchmarks yet.

答案4

得分: 6

我写了一个Go版本的GenPrime(可以在我fork的项目这里找到)。我在Ferrous Moon的这个帖子上发布了我收到的结果(与C版本进行了比较)。尽管我的Go版本使用了浮点数运算而不是整数运算,但结果令人印象深刻。

英文:

I wrote a Go port of GenPrime (which is available at my fork of the project here). I published the results I received (compared to the C version) on this topic at Ferrous Moon. Despite the fact that my Go port used floating-point math versus integer math, the results are impressive.

答案5

得分: 2

《Go程序性能分析》(http://blog.golang.org/2011/06/profiling-go-programs.html)讨论了Robert Hundt的C++/Scala/Go基准测试,并清楚地解释了如何对Go应用程序进行性能调优。这是一个单一程序基准测试,但值得一读,以了解性能调优的工具支持水平,并且结果显示在Hundt选择的这个特定问题上,Go与C++具有竞争力。

英文:

Profiling Go Programs discusses Robert Hundt's C++/Scala/Go benchmarks and also clearly explains how to performance tune Go applications. It's a single program benchmark but is worth reading to get an idea of the level of tool support for performance tuning and the results show that it is competitive with C++ on this particular problem chosen by Hundt.

答案6

得分: 1

请记住,GC是一个简单的标记-清除实现。我不明白的是为什么Go没有利用LLVM编译器工具链?

英文:

Keep in mind that the GC is a simple mark-sweep implementation. What I don't understand is why isn't Go utilizing the LLVM compiler tool chain?

huangapple
  • 本文由 发表于 2009年11月13日 03:19:46
  • 转载请务必保留本文链接:https://go.coder-hub.com/1724680.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定