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.43 12,716 386 3.43 100% 1% 1% 0%
C gcc 1.75 2,728 452 1.74 1% 2% 0% 100%
regex-redux
source secs mem gz cpu cpu load
Python 3 15.22 447,324 512 27.44 25% 33% 32% 91%
C gcc 1.50 152,088 1230 4.06 54% 59% 60% 100%
reverse-complement
source secs mem gz cpu cpu load
Python 3 18.79 1,008,868 814 19.73 9% 69% 35% 30%
C gcc 1.75 994,468 1438 3.96 48% 44% 95% 44%
k-nucleotide
source secs mem gz cpu cpu load
Python 3 77.65 182,700 1967 302.86 97% 99% 97% 98%
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.55 280,624 589 337.74 92% 89% 87% 93%
C gcc 2.54 130,292 836 7.76 78% 67% 64% 98%
fasta
source secs mem gz cpu cpu load
Python 3 59.47 15,996 1947 138.97 55% 55% 63% 66%
C gcc 1.32 2,892 2268 5.22 100% 100% 99% 99%
fannkuch-redux
source secs mem gz cpu cpu load
Python 3 565.97 15,528 950 2,172.63 95% 94% 95% 100%
C gcc 8.72 980 910 34.43 98% 97% 100% 100%
n-body
source secs mem gz cpu cpu load
Python 3 838.39 10,324 1196 838.20 95% 1% 5% 0%
C gcc 9.22 1,228 1490 9.22 100% 1% 1% 0%
spectral-norm
source secs mem gz cpu cpu load
Python 3 180.97 15,876 443 720.51 100% 100% 100% 100%
C gcc 1.99 1,292 569 7.89 99% 99% 99% 99%
mandelbrot
source secs mem gz cpu cpu load
Python 3 225.24 15,736 688 899.25 100% 100% 100% 100%
C gcc 1.64 26,416 1135 6.55 100% 100% 99% 100%
Python 3

Python 3.6.3

C gcc

gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0