I see the claims that Go is supposed to be almost comparable in speed to C, but are there any benchmarks available yet?
6 Answers
Go is added to the Computer Language Benchmarks Game. In comparison to C++ it has still a way to go.
November 2009:
(source: debian.org)
October 2011:
(source: debian.org)

- 21,988
- 13
- 81
- 109

- 56,376
- 15
- 76
- 59
-
1You'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 Nov 13 '09 at 18:32
-
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 Nov 14 '09 at 03:27
-
2Wow, that is quite an increase in performance over just one year! – Xeoncross Sep 24 '12 at 15:48
-
Site's dead as of 2022 – ggorlen Oct 07 '22 at 05:27
There is a benchmark folder in the distribution. Check out $GOROOT/test/bench
.

- 8,187
- 4
- 48
- 76
-
5The 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 Nov 12 '09 at 23:40
-
-
2The 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 Nov 13 '09 at 10:00
-
@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 Nov 13 '09 at 18:36
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.

- 34,502
- 9
- 78
- 118
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.

- 1,968
- 17
- 19
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.

- 118,113
- 30
- 216
- 245
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?

- 11
- 1
-
4I 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 Nov 14 '09 at 19:17
-
@Alexei From what I know, that "too slow" was targeted at compilation speed which is one of the primary goal of Go. – fuz Feb 27 '13 at 22:14