/mobile Handheld Friendly website
x64 Ubuntu : Intel® Q6600® one core |
Each chart bar shows, for one unidentified benchmark, how much the fastest Go program used compared to the fastest C gcc program.
These are not the only compilers and interpreters. These are not the only programs that could be written. These are not the only tasks that could be solved. These are just 10 tiny examples.
Each table row shows, for one named benchmark, how much the fastest Go program used compared to the fastest C gcc program.
| Go used what fraction? used how many times more? | ||||
|---|---|---|---|---|
| Benchmark | Time | Memory | Code | |
| fasta | ± | 3× | ± | |
| fasta-redux | ± | 3× | ± | |
| reverse-complement | ± | ± | 2× | |
| k-nucleotide | 2× | ± | 1/2 | |
| mandelbrot | 2× | ± | ± | |
| spectral-norm | 2× | 2× | ± | |
| pidigits | 2× | 4× | ± | |
| n-body | 3× | 3× | ± | |
| fannkuch-redux | 3× | 3× | ± | |
| binary-trees | 10× | 3× | 1/2 | |
| regex-dna | 13× | 2× | 1/3 | |
| Go used what fraction? used how many times more? | |||||||
|---|---|---|---|---|---|---|---|
| Time-used | |- | |--- | 25% | median | 75% | ---| | -| |
| (Elapsed secs) | ± | ± | 2× | 2× | 3× | 5× | 13× |
± read the measurements and then read the program source code.
These are not the only tasks that could be solved. These are just 10 tiny examples. These are not the only compilers and interpreters. These are not the only programs that could be written.
For each named benchmark, measurements of the fastest Go program are shown for comparison against measurements of the fastest C gcc program.
| Program Source Code | CPU secs | Elapsed secs | Memory KB | Code B | ≈ CPU Load |
|---|---|---|---|---|---|
| fasta | |||||
| Go | 6.94 | 6.94 | 1,272 | 1036 | 0% 0% 0% 100% |
| C gcc | 5.96 | 5.97 | 372 | 1221 | 0% 0% 0% 100% |
| fasta-redux | |||||
| Go | 1.96 | 1.97 | 1,272 | 1236 | 0% 1% 0% 100% |
| C gcc | 1.60 | 1.61 | 376 | 1321 | 0% 0% 1% 100% |
| reverse-complement | |||||
| Go | 1.00 | 1.01 | 249,928 | 1243 | 0% 1% 0% 100% |
| C gcc | 0.70 | 0.71 | 248,716 | 741 | 1% 0% 3% 100% |
| k-nucleotide | |||||
| Go | 75.70 | 75.76 | 262,172 | 1268 | 0% 0% 0% 100% |
| C gcc | 40.79 | 40.82 | 180,140 | 2280 | 0% 0% 0% 100% |
| mandelbrot | |||||
| Go | 46.69 | 46.71 | 31,768 | 700 | 0% 0% 0% 100% |
| C gcc | 23.53 | 23.54 | 28,620 | 879 | 0% 0% 0% 100% |
| spectral-norm | |||||
| Go | 15.70 | 15.71 | 1,528 | 668 | 0% 0% 0% 100% |
| C gcc | 7.85 | 7.86 | 752 | 569 | 0% 0% 1% 100% |
| pidigits | |||||
| Go | 3.49 | 3.49 | 4,216 | 607 | 0% 0% 0% 100% |
| C gcc | 1.72 | 1.73 | 940 | 448 | 0% 0% 2% 100% |
| n-body | |||||
| Go | 26.62 | 26.64 | 1,272 | 1310 | 0% 0% 0% 100% |
| C gcc | 9.32 | 9.33 | 432 | 1490 | 1% 0% 0% 100% |
| fannkuch-redux | |||||
| Go | 73.61 | 73.64 | 1,276 | 900 | 0% 0% 0% 100% |
| C gcc | 22.69 | 22.70 | 372 | 1183 | 0% 0% 0% 100% |
| binary-trees | |||||
| Go | 122.72 | 122.87 | 475,300 | 516 | 0% 0% 0% 100% |
| C gcc | 12.48 | 12.49 | 149,200 | 850 | 0% 0% 0% 100% |
| regex-dna | |||||
| Go | 65.05 | 65.09 | 466,128 | 785 | 0% 0% 0% 100% |
| C gcc | 5.15 | 5.16 | 296,088 | 2579 | 0% 0% 1% 100% |
Remember - those are just the fastest Go and C gcc programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for Go.
Maybe one of those other Go programs is fastest on a different OS/machine.
Remember - those are just the fastest Go and C gcc programs measured on this OS/machine. Check if there are faster implementations of these benchmark programs for other programming languages.
Maybe one of those other programs is fastest on a different OS/machine.
go version go1.1.1 linux/amd64
SPLASH 2012 Go at Google: Language Design in the Service of Software Engineering
Home Page: Go - a systems programming language
Download: Installing Go