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

 Go used what fraction? used how many times more? 
Benchmark Time Memory Code
 reverse-complement †±±±
 pidigits †±1/141/3
 fasta-redux±1/14±
 spectral-norm±1/10±
 n-body±1/14±
 fasta±1/14±
 fannkuch-redux±1/14±
 mandelbrot1/2±
 regex-dna1/2±
 k-nucleotide1/2±
 binary-trees±±
 Go used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)±±±±

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

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 reverse-complement 
Go1.060.96249,9321243  0% 19% 63% 27% †
Java 72.791.31298,4041661  61% 77% 40% 39% †
 pidigits 
Go3.453.284,216607  19% 81% 0% 2% †
Java 710.204.2960,5201808  68% 62% 65% 45% †
 fasta-redux 
Go1.961.971,2721237  1% 0% 1% 100%
Java 72.562.5217,3081443  0% 1% 1% 100%
 spectral-norm 
Go15.724.071,772668  96% 98% 97% 97%
Java 717.614.5117,540950  97% 97% 99% 98%
 n-body 
Go26.6326.631,2721310  86% 14% 0% 0%
Java 722.5122.5017,2561424  0% 0% 100% 0%
 fasta 
Go6.946.941,2721036  32% 67% 0% 0%
Java 75.215.1418,2841507  0% 1% 1% 100%
 fannkuch-redux 
Go73.5718.491,276900  100% 99% 99% 99%
Java 751.9013.1517,3481282  99% 99% 98% 98%
 mandelbrot 
Go46.7311.7029,880700  100% 100% 100% 100%
Java 727.827.0769,460796  99% 98% 99% 98%
 regex-dna 
Go65.0819.87469,876785  77% 75% 76% 99%
Java 724.828.55709,672929  65% 82% 65% 79%
 k-nucleotide 
Go83.2633.62262,2241268  97% 86% 36% 30%
Java 746.3913.25450,9721630  86% 84% 96% 85%
 binary-trees 
Go233.8863.20486,5601000  95% 94% 93% 91%
Java 722.319.24523,7841007  37% 65% 58% 83%

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