The Q6600
Benchmarks Game

Swift versus C++ g++ fastest programs

Always look at the source code.

These are only the fastest programs. Look at the other programs. They may seem more-like a fair comparison to you.

fannkuch-redux
source secs mem gz busy cpu load
Swift 10.08 8,028 1097 39.99 98% 100% 99% 100%
C++ g++ 10.71 1,708 980 42.33 100% 96% 100% 100%
pidigits
source secs mem gz busy cpu load
Swift 1.75 8,716 600 2.05 5% 100% 12% 1%
C++ g++ 1.82 4,312 513 1.87 1% 1% 2% 100%
fasta
source secs mem gz busy cpu load
Swift 2.91 8,524 1945 4.59 18% 62% 63% 14%
C++ g++ 1.46 2,024 2711 4.40 75% 76% 75% 76%
reverse-complement
source secs mem gz busy cpu load
Swift 3.79 753,924 1286 4.83 7% 70% 12% 39%
C++ g++ 1.89 499,672 2093 1.94 100% 2% 1% 1%
spectral-norm
source secs mem gz busy cpu load
Swift 3.99 7,836 601 15.93 100% 100% 100% 100%
C++ g++ 1.99 2,408 1044 7.89 99% 99% 99% 99%
mandelbrot
source secs mem gz busy cpu load
Swift 3.20 39,320 1138 12.68 99% 100% 99% 99%
C++ g++ 1.51 26,256 1791 6.01 100% 99% 99% 99%
n-body
source secs mem gz busy cpu load
Swift 21.74 12,092 1355 22.86 1% 2% 100% 2%
C++ g++ 7.70 1,612 1879 7.81 100% 0% 1% 1%
k-nucleotide
source secs mem gz busy cpu load
Swift 22.39 257,104 1367 84.59 94% 96% 93% 95%
C++ g++ 3.88 156,164 1631 12.09 72% 92% 71% 77%
binary-trees
source secs mem gz busy cpu load
Swift 38.21 702,592 816 122.34 76% 70% 79% 95%
C++ g++ 3.96 113,236 809 12.86 74% 84% 98% 69%
regex-redux
source secs mem gz busy cpu load
Swift 44.59 885,164 715 81.94 19% 60% 20% 85%
C++ g++ 1.86 203,856 1315 4.49 99% 50% 48% 44%
Swift

Swift version 5.1.3 (swift-5.1.3-RELEASE)
Target: x86_64-unknown-linux-gnu

C++ g++

g++ (Ubuntu 9.3.0-10ubuntu2) 9.3.0