The Computer Language
Benchmarks Game

Go programs versus C++ g++

by benchmark task performance

reverse-complement
source secs mem gz cpu cpu load
Go 1.01 133,360 1278 1.00 3% 1% 1% 99%
C++ g++ 1.02 247,604 2275 1.01 2% 0% 0% 100%
mandelbrot
source secs mem gz cpu cpu load
Go 27.17 34,800 894 27.16 0% 1% 1% 100%
C++ g++ 20.11 33,768 726 20.10 0% 1% 1% 100%
pidigits
source secs mem gz cpu cpu load
Go 3.86 8,032 729 3.85 2% 0% 0% 100%
C++ g++ 2.27 3,440 508 2.27 0% 1% 1% 100%
k-nucleotide
source secs mem gz cpu cpu load
Go 47.48 147,788 1582 47.45 1% 1% 0% 100%
C++ g++ 24.04 137,908 1252 23.98 1% 1% 0% 100%
spectral-norm
source secs mem gz cpu cpu load
Go 15.71 928 668 15.70 0% 1% 1% 100%
C++ g++ 7.93 2,288 1044 7.92 1% 1% 0% 100%
fasta
source secs mem gz cpu cpu load
Go 10.29 988 1036 10.28 0% 1% 0% 100%
C++ g++ 4.21 1,336 1105 4.20 1% 1% 0% 100%
n-body
source secs mem gz cpu cpu load
Go 23.18 928 1310 23.17 1% 0% 0% 100%
C++ g++ 8.96 816 1545 8.95 1% 1% 0% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Go 94.45 924 900 94.42 0% 1% 1% 100%
C++ g++ 24.65 556 1150 24.64 1% 1% 0% 100%
binary-trees
source secs mem gz cpu cpu load
Go 167.96 184,252 548 167.86 0% 1% 1% 100%
C++ g++ 6.86 76,616 846 6.85 0% 1% 0% 100%
Go

go version go1.7 linux/386

C++ g++

g++ (Ubuntu 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609