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
 k-nucleotide±±1/2
 fasta-redux± ±
 fannkuch-redux± 1/2
 reverse-complement±
 spectral-norm ±
 pidigits 
 mandelbrot ±
 fasta ±
 n-body ±
 binary-trees±
 regex-dna11×1/3
 Go used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)±±±11×

± 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
 k-nucleotide 
Go30.938.42251,0241399  98% 91% 90% 90%
C gcc35.0911.37188,4962280  64% 91% 61% 94%
 fasta-redux 
Go1.711.711,0361237  0% 1% 1% 99%
C gcc1.631.643641402  2% 1% 100% 1%
 fannkuch-redux 
Go67.1616.861,032900  100% 100% 100% 100%
C gcc55.4814.254281557  98% 96% 96% 100%
 reverse-complement 
Go0.930.77250,5641243  10% 69% 11% 35%
C gcc0.770.51250,784741  21% 18% 74% 43%
 spectral-norm 
Go15.703.961,816536  99% 99% 99% 99%
C gcc7.891.98752569  99% 99% 100% 100%
 pidigits 
Go3.763.523,668674  4% 48% 7% 51%
C gcc1.731.73932448  1% 1% 3% 100%
 mandelbrot 
Go41.7510.4833,484837  100% 100% 100% 100%
C gcc19.445.0231,928694  96% 96% 100% 96%
 fasta 
Go7.267.271,0281036  1% 1% 1% 100%
C gcc3.393.393641261  2% 0% 1% 100%
 n-body 
Go22.9522.951,0361310  0% 0% 100% 1%
C gcc10.1910.194361490  0% 1% 1% 100%
 binary-trees 
Go68.4118.42266,624814  94% 94% 92% 93%
C gcc10.373.33155,504906  79% 62% 74% 99%
 regex-dna 
Go85.5325.85541,836785  96% 78% 77% 81%
C gcc5.812.44305,4882579  60% 51% 80% 52%

 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.3 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

Revised BSD license

  Home   Conclusions   License   Play