/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 Ruby 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 Ruby 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
 fannkuch-redux †1/136 
 fasta-redux1/62 
 mandelbrot1/46 ±
 n-body1/29 ±
 spectral-norm1/25 1/2
 fasta1/23 ±
 reverse-complement1/9
 k-nucleotide †1/41/2
 binary-trees †1/31/2
 pidigits1/3 
 regex-dna±
 Go used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/1361/1361/361/231/41/2±

† 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 Ruby program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 fannkuch-redux 
Go71.1817.87988900  99% 100% 100% 100% †
Ruby2,433.052,433.757,508384  0% 0% 0% 100% †
 fasta-redux 
Go1.791.799961236  100% 1% 0% 0%
Ruby111.03111.08251,648772  0% 1% 1% 100%
 mandelbrot 
Go46.3511.6030,056700  100% 100% 100% 100%
Ruby2,141.69536.39182,724925  100% 100% 100% 100%
 n-body 
Go22.8522.859921310  0% 100% 0% 0%
Ruby662.33662.517,5041137  0% 1% 0% 100%
 spectral-norm 
Go15.703.941,480536  100% 100% 100% 99%
Ruby379.9798.7042,696828  96% 96% 97% 97%
 fasta 
Go6.606.609921036  1% 1% 0% 100%
Ruby146.20151.337,520987  27% 30% 7% 39%
 reverse-complement 
Go1.060.94249,6681243  84% 15% 2% 14%
Ruby8.358.36130,032255  0% 100% 1% 0%
 k-nucleotide 
Go76.0628.90261,9961268  37% 48% 83% 97% †
Ruby112.75112.79501,972449  1% 100% 0% 0% †
 binary-trees 
Go205.1354.01567,8121000  96% 95% 96% 95% †
Ruby186.27186.40894,240412  1% 100% 1% 1% †
 pidigits 
Go3.463.303,944607  2% 2% 100% 1%
Ruby11.1511.1775,236240  1% 1% 0% 100%
 regex-dna 
Go65.3119.80579,908785  88% 88% 77% 77%
Ruby34.1615.00291,124501  42% 41% 91% 54%

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