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

± 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 
Go6.946.941,2721036  0% 0% 0% 100%
C gcc5.965.973721221  0% 0% 0% 100%
 fasta-redux 
Go1.961.971,2721236  0% 0% 1% 100%
C gcc1.601.613761321  0% 0% 1% 100%
 reverse-complement 
Go0.991.00249,9281243  0% 0% 1% 100%
C gcc0.700.71248,716741  1% 0% 3% 100%
 k-nucleotide 
Go77.6377.69262,1801268  0% 0% 0% 100%
C gcc40.7940.82180,1402280  0% 0% 0% 100%
 pidigits 
Go3.373.374,220607  0% 0% 0% 100%
C gcc1.721.73940448  0% 0% 2% 100%
 mandelbrot 
Go46.6846.7031,788700  0% 0% 0% 100%
C gcc23.5323.5428,620879  0% 0% 0% 100%
 spectral-norm 
Go15.7015.711,524668  0% 0% 0% 100%
C gcc7.857.86752569  0% 0% 1% 100%
 n-body 
Go26.5826.591,2721310  0% 0% 0% 100%
C gcc9.329.334321490  1% 0% 0% 100%
 fannkuch-redux 
Go73.7273.741,276900  0% 0% 0% 100%
C gcc22.6922.703721183  0% 0% 0% 100%
 binary-trees 
Go121.84121.99475,292516  0% 0% 0% 100%
C gcc12.4812.49149,200850  0% 0% 0% 100%
 regex-dna 
Go64.9665.00466,148785  0% 0% 0% 100%
C gcc5.155.16296,0882579  0% 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.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

Revised BSD license

  Home   Conclusions   License   Play