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.51 10,500 386 3.50 1% 1% 0% 100%
C gcc 1.75 2,728 452 1.74 1% 2% 0% 100%
reverse-complement
source secs mem gz cpu cpu load
Python 3 16.76 1,005,252 814 20.08 65% 21% 44% 17%
C gcc 1.75 994,468 1438 3.96 48% 44% 95% 44%
regex-redux
source secs mem gz cpu cpu load
Python 3 15.56 439,964 512 27.97 25% 92% 32% 32%
C gcc 1.50 152,088 1230 4.06 54% 59% 60% 100%
k-nucleotide
source secs mem gz cpu cpu load
Python 3 79.79 250,948 1967 309.42 98% 96% 96% 99%
C gcc 5.07 130,008 1506 15.25 88% 84% 58% 73%
binary-trees
source secs mem gz cpu cpu load
Python 3 93.40 449,328 589 336.54 88% 92% 94% 89%
C gcc 2.54 130,292 836 7.76 78% 67% 64% 98%
fasta
source secs mem gz cpu cpu load
Python 3 62.88 680,736 1947 141.15 60% 56% 48% 62%
C gcc 1.32 2,892 2268 5.22 100% 100% 99% 99%
fannkuch-redux
source secs mem gz cpu cpu load
Python 3 547.23 48,052 950 2,162.70 99% 100% 97% 100%
C gcc 8.72 980 910 34.43 98% 97% 100% 100%
n-body
source secs mem gz cpu cpu load
Python 3 882.00 8,212 1196 881.81 91% 0% 1% 9%
C gcc 9.17 1,228 1490 9.17 100% 0% 0% 1%
spectral-norm
source secs mem gz cpu cpu load
Python 3 193.86 50,556 443 757.23 98% 98% 99% 99%
C gcc 1.99 1,292 569 7.89 99% 99% 99% 99%
mandelbrot
source secs mem gz cpu cpu load
Python 3 279.68 49,344 688 1,117.29 100% 100% 100% 100%
C gcc 1.64 26,416 1135 6.55 100% 100% 99% 100%
Python 3

Python 3.7.0

C gcc

gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0