/mobile Handheld Friendly website

vs

 1 : Are the Go programs faster? At a glance.

Each chart bar shows, for one unidentified benchmark, how much the fastest Go program used compared to the fastest C gcc program.

(Memory use is only compared for tasks that require memory to be allocated.)


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.

 2 : Are the Go programs faster? Approximately.

Each table row shows, for one named benchmark, how much the fastest Go program used compared to the fastest C gcc program.

(Memory use is only compared for tasks that require memory to be allocated.)

 Go used what fraction? used how many times more? 
Benchmark Time Memory Code
 fasta-redux± ±
 k-nucleotide±1/2
 binary-trees±
 fannkuch-redux 1/2
 mandelbrot ±
 n-body ±
 spectral-norm ±
 reverse-complement †1/2±
 pidigits ±
 fasta † ±
 regex-dna1/3
 Go used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)±±

† possible mismatch - one-core program compared to multi-core program.

± read the measurements and then read the program source code.

 3 : Are the Go programs faster? Measurements.

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-redux 
Go1.711.717241236  2% 1% 100% 3%
C gcc1.661.672961321  1% 0% 0% 99%
 k-nucleotide 
Go52.7219.59260,0801268  96% 51% 82% 42%
C gcc43.3015.85153,6722280  96% 96% 37% 46%
 binary-trees 
Go155.7940.43263,8521000  97% 97% 96% 96%
C gcc80.6822.55109,188963  94% 85% 90% 91%
 fannkuch-redux 
Go107.4626.96724900  100% 100% 100% 100%
C gcc54.7614.223561557  91% 100% 96% 98%
 mandelbrot 
Go48.6412.1730,116700  100% 100% 100% 100%
C gcc22.625.6627,076799  100% 100% 100% 100%
 n-body 
Go24.1924.197281310  0% 100% 1% 0%
C gcc9.859.853441490  0% 1% 100% 0%
 spectral-norm 
Go20.765.211,448536  100% 100% 100% 100%
C gcc7.871.98652569  99% 100% 99% 99%
 reverse-complement 
Go1.821.82159,880543  2% 0% 0% 100% †
C gcc0.920.67248,640741  15% 11% 79% 36% †
 pidigits 
Go7.356.903,216607  1% 2% 3% 100%
C gcc2.502.50868448  0% 4% 100% 0%
 fasta 
Go16.6616.667241036  22% 28% 100% 12% †
C gcc5.045.052961221  0% 1% 100% 0% †
 regex-dna 
Go72.3422.25630,192785  77% 85% 75% 89%
C gcc6.432.78293,0682579  69% 43% 48% 74%

† possible mismatch - one-core program compared to multi-core program.

 4 : Are there other Go programs for these benchmarks?

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.

 5 : Are there other faster programs for these benchmarks?

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 : types just are - Go is an experiment 

go version go1.2 linux/386

SPLASH 2012 Go at Google: Language Design in the Service of Software Engineering

Home Page: Go - a systems programming language

Download: Installing Go

Revised BSD license

  Home   Conclusions   License   Play