/mobile Handheld Friendly website

÷

 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.


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.

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

† 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.881.891,0121236  0% 1% 100% 1%
C gcc1.671.672921321  1% 0% 100% 1%
 k-nucleotide 
Go49.2619.30260,0441268  52% 56% 63% 86%
C gcc39.8814.64153,6882280  96% 92% 50% 36%
 fannkuch-redux 
Go84.8921.361,012900  99% 99% 99% 100%
C gcc51.3813.073321557  96% 100% 100% 98%
 mandelbrot 
Go48.7212.2929,708700  100% 100% 100% 100%
C gcc23.255.8327,596799  100% 100% 100% 100%
 spectral-norm 
Go20.775.251,488668  99% 99% 100% 98%
C gcc8.022.02644569  100% 100% 100% 100%
 pidigits 
Go7.346.924,404607  100% 1% 2% 1%
C gcc2.492.50864448  21% 0% 0% 80%
 reverse-complement 
Go1.861.87159,972543  0% 2% 100% 0% †
C gcc0.920.65248,632741  17% 31% 83% 16% †
 fasta 
Go16.6816.681,0121036  77% 0% 0% 23%
C gcc4.924.932921221  0% 0% 100% 0%
 n-body 
Go35.7035.691,0041310  94% 0% 0% 6%
C gcc8.858.853361490  0% 0% 100% 1%
 regex-dna 
Go72.5222.641,022,080785  96% 78% 73% 74%
C gcc6.072.69291,9642579  68% 41% 72% 48%
 binary-trees 
Go198.1752.46300,676688  95% 96% 94% 95%
C gcc14.384.32103,396850  81% 90% 99% 72%

† 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.1 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