The Computer Language
Benchmarks Game

Python 3 versus C gcc fastest programs

by faster benchmark performance

pidigits
source secs mem gz cpu cpu load
Python 3 3.48 10,352 386 3.47 1% 1% 0% 100%
C gcc 1.75 2,672 452 1.75 100% 2% 2% 0%
reverse-complement
source secs mem gz cpu cpu load
Python 3 16.03 1,007,016 814 19.29 18% 59% 44% 23%
C gcc 1.76 994,488 1438 3.98 97% 43% 44% 46%
regex-redux
source secs mem gz cpu cpu load
Python 3 16.98 445,760 512 31.44 28% 74% 47% 38%
C gcc 1.46 152,216 1397 3.40 45% 41% 100% 49%
k-nucleotide
source secs mem gz cpu cpu load
Python 3 72.80 189,720 1967 276.09 95% 96% 98% 94%
C gcc 4.88 130,060 1506 16.06 87% 96% 87% 60%
binary-trees
source secs mem gz cpu cpu load
Python 3 83.95 451,732 589 290.57 88% 87% 87% 97%
C gcc 3.73 116,600 836 11.74 76% 71% 98% 72%
fasta
source secs mem gz cpu cpu load
Python 3 63.19 680,688 1947 135.52 62% 70% 63% 22%
C gcc 1.36 2,864 2268 5.41 99% 100% 100% 99%
fannkuch-redux
source secs mem gz cpu cpu load
Python 3 507.56 50,988 950 1,998.88 99% 99% 97% 99%
C gcc 8.67 852 910 34.14 99% 100% 100% 95%
n-body
source secs mem gz cpu cpu load
Python 3 850.24 7,916 1242 850.06 0% 0% 0% 100%
C gcc 9.37 1,088 1490 9.37 100% 0% 1% 0%
spectral-norm
source secs mem gz cpu cpu load
Python 3 182.12 52,752 443 705.87 96% 96% 96% 100%
C gcc 1.98 1,168 1139 7.87 100% 99% 100% 99%
mandelbrot
source secs mem gz cpu cpu load
Python 3 263.04 51,780 688 1,050.80 100% 100% 100% 100%
C gcc 1.64 26,512 1135 6.54 99% 100% 99% 100%
Python 3

Python 3.7.1

C gcc

gcc (Ubuntu 8.2.0-7ubuntu1) 8.2.0