views:

1807

answers:

7

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

+6  A: 

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.

Dave Swersky
+3  A: 

From the Go FAQ:

Who should use the language?

Go is an experiment. We hope adventurous users will give it a try and see if they enjoy it. Not every programmer will, but we hope enough will find satisfaction in the approach it offers to justify further development.

So, Go is an experiment... If you'd like to know the answer... go experiment! :-)

asveikau
+10  A: 

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

Jurily
The benchmarks are mostly from debians computer language benchmarks game. I've startet to port the missing ones: http://github.com/hoffmann/go-shootout Any help is welcome.
Peter Hoffmann
What do you mean "missing ones"?
igouy
The debian computer language benchmarks game has 50+ examples https://alioth.debian.org/scm/viewvc.php/shootout/bench/?root=shootout only some of them are implemented in $GROOT/test/bench
Peter Hoffmann
@Peter Hoffman - No it doesn't. It has the 13 examples shown here - http://shootout.alioth.debian.org/u32q/index.php - And it has obsolete removed code from a history stretching into the previous century.
igouy
+4  A: 

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.

Eddie Ringle
+2  A: 

I have a language benchmark testing string generation at http://forums.idlesoft.net/viewtopic.php?f=&t=77

I added Go yesterday, so here you go.

ChaosR
+12  A: 

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

alt text

Peter Hoffmann
You're a programmer! Don't you think how we write a program matters? http://www.reddit.com/r/programming/comments/a3yaq/go_added_to_programming_language_shootout_not/c0fqvol
igouy
You're right, the last sentence should have been "in comparison ... go and the implementation of the benchmarks still have a way to go". So I'm looking forward to learn ways how to speed up the benchmarks and go programs in general.
Peter Hoffmann
A: 

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?

Jesse
I have no idea how valid this is but the [FAQ](http://golang.org/doc/go_faq.html) says: "We also considered using LLVM for 6g but we felt it was too large and slow to meet our performance goals."
mjs