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 PHP 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 PHP 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-redux1/51 ±
 fasta-redux1/38 ±
 binary-trees †1/351/4
 n-body1/31 ±
 mandelbrot1/31 ±
 spectral-norm1/29 1/2
 fasta1/19 ±
 reverse-complement †1/81/2
 k-nucleotide1/2±±
 pidigits 
 regex-dna±
 Go used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/511/511/331/291/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 PHP program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 fannkuch-redux 
Go67.1616.861,032900  100% 100% 100% 100%
PHP3,372.33862.7814,9681150  99% 98% 99% 95%
 fasta-redux 
Go1.711.711,0361237  0% 1% 1% 99%
PHP64.6564.683,5881110  11% 26% 3% 70%
 binary-trees 
Go68.4118.42266,624814  94% 94% 92% 93% †
PHP634.80635.631,025,300472  0% 0% 0% 100% †
 n-body 
Go22.9522.951,0361310  0% 0% 100% 1%
PHP712.83713.053,3361082  100% 0% 0% 0%
 mandelbrot 
Go41.7510.4833,484837  100% 100% 100% 100%
PHP1,288.37322.44115,808863  100% 100% 100% 100%
 spectral-norm 
Go15.703.961,816536  99% 99% 99% 99%
PHP446.61113.8524,4081193  98% 97% 100% 98%
 fasta 
Go7.267.271,0281036  1% 1% 1% 100%
PHP133.11136.583,3281030  60% 36% 4% 0%
 reverse-complement 
Go0.930.77250,5641243  10% 69% 11% 35% †
PHP6.406.41444,376262  0% 0% 0% 100% †
 k-nucleotide 
Go30.938.42251,0241399  98% 91% 90% 90%
PHP53.6519.10248,0441141  65% 66% 70% 82%
 pidigits 
Go3.763.523,668674  4% 48% 7% 51%
PHP2.162.164,280394  1% 0% 0% 100%
 regex-dna 
Go47.4016.27543,868789  86% 64% 64% 78%
PHP26.249.60151,380832  52% 70% 57% 95%

† 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 PHP 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 PHP 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.3 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