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

± 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.791.799921236  0% 1% 2% 100%
C gcc1.661.663601321  1% 2% 0% 100%
 fasta 
Go6.606.619921036  0% 0% 1% 100%
C gcc6.066.073641221  1% 1% 1% 100%
 reverse-complement 
Go0.980.99249,6641243  1% 2% 1% 100%
C gcc0.670.67250,856741  3% 0% 2% 100%
 spectral-norm 
Go15.7015.711,240668  0% 0% 1% 100%
C gcc7.857.85752569  1% 1% 1% 100%
 pidigits 
Go3.503.513,936607  0% 1% 1% 100%
C gcc1.731.73932448  0% 1% 1% 100%
 n-body 
Go22.8522.869921310  0% 1% 1% 100%
C gcc10.1910.194321490  1% 0% 0% 100%
 k-nucleotide 
Go76.1376.19261,9881268  0% 1% 1% 100%
C gcc32.1532.18180,3082280  0% 1% 1% 100%
 mandelbrot 
Go46.3446.3631,300700  0% 0% 1% 100%
C gcc19.3819.3931,460694  0% 0% 1% 100%
 binary-trees 
Go111.09111.22479,796516  1% 1% 1% 100%
C gcc36.2536.28131,668706  2% 1% 1% 100%
 fannkuch-redux 
Go71.1871.20984900  0% 0% 1% 100%
C gcc22.7122.723961183  1% 0% 0% 100%
 regex-dna 
Go65.1165.14486,856785  0% 1% 1% 100%
C gcc5.225.23321,9082579  1% 0% 1% 100%

 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/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