/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 PHP 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 PHP program.

 Go used what fraction? used how many times more? 
Benchmark Time Memory Code
 fannkuch-redux1/401/12±
 mandelbrot1/301/4±
 n-body1/291/3±
 spectral-norm1/261/131/2
 binary-trees †1/111/2
 fasta1/91/3±
 reverse-complement1/7±
 k-nucleotide1/3±±
 regex-dna †1/2
 pidigits±
 Go used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/401/401/291/101/3±

† 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 
Go73.5718.491,276900  100% 99% 99% 99%
PHP2,934.10735.7514,6881150  100% 100% 100% 100%
 mandelbrot 
Go46.7311.7029,880700  100% 100% 100% 100%
PHP1,408.05352.36114,632863  100% 100% 100% 100%
 n-body 
Go26.6326.631,2721310  86% 14% 0% 0%
PHP761.92762.133,2681082  0% 0% 100% 0%
 spectral-norm 
Go15.724.071,772668  96% 98% 97% 97%
PHP415.31105.7323,9121193  99% 99% 98% 98%
 binary-trees 
Go233.8863.20486,5601000  95% 94% 93% 91% †
PHP697.38698.911,021,804504  8% 6% 1% 87% †
 fasta 
Go6.946.941,2721036  32% 67% 0% 0%
PHP63.9864.003,2601110  0% 0% 100% 0%
 reverse-complement 
Go1.060.96249,9321243  0% 19% 63% 27%
PHP6.626.65369,740297  0% 0% 0% 100%
 k-nucleotide 
Go83.2633.62262,2241268  97% 86% 36% 30%
PHP330.6592.65247,6401060  88% 81% 93% 96%
 regex-dna 
Go65.0819.87469,876785  77% 75% 76% 99% †
PHP35.8035.82222,432459  0% 0% 0% 100% †
 pidigits 
Go3.453.284,216607  19% 81% 0% 2%
PHP2.182.184,196384  1% 0% 0% 100%
 fasta-redux 
Go0.030.05?1237  20% 0% 0% 80%
No program

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