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

† 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 
Go6.946.941,2721036  82% 20% 2% 0%
C gcc5.965.973721221  0% 0% 0% 100%
 fasta-redux 
Go1.961.961,2721236  1% 100% 0% 1%
C gcc1.601.613721321  0% 0% 99% 1%
 fannkuch-redux 
Go73.6818.521,276900  100% 99% 99% 99%
C gcc48.3812.424121557  98% 93% 98% 100%
 reverse-complement 
Go1.030.95249,9321243  68% 40% 0% 0% †
C gcc0.800.56248,716741  16% 20% 44% 73% †
 pidigits 
Go3.303.134,216607  0% 100% 2% 2%
C gcc1.721.73936448  0% 0% 1% 100%
 k-nucleotide 
Go76.9330.64262,2321268  48% 83% 99% 22%
C gcc44.6416.00180,3802280  35% 50% 98% 97%
 mandelbrot 
Go46.7211.7030,000700  100% 100% 100% 100%
C gcc23.525.8925,976879  100% 100% 100% 100%
 spectral-norm 
Go15.734.071,508668  96% 97% 99% 96%
C gcc7.871.98748569  99% 99% 99% 100%
 n-body 
Go26.5826.581,2721310  83% 17% 0% 0%
C gcc9.339.344321490  100% 0% 0% 1%
 regex-dna 
Go65.1219.76470,000785  77% 77% 99% 77%
C gcc5.762.50292,1282579  69% 68% 49% 46%
 binary-trees 
Go239.1563.51556,544688  94% 94% 96% 94%
C gcc15.714.79155,788850  93% 67% 78% 94%

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