The Computer Language
Benchmarks Game

Python 3 programs versus C gcc

by benchmark task performance

pidigits
source secs mem gz cpu cpu load
Python 3 4.47 8,308 382 4.46 0% 36% 63% 100%
C gcc 2.50 1,992 448 2.50 2% 1% 1% 100%
reverse-complement
source secs mem gz cpu cpu load
Python 3 5.54 262,360 800 5.53 1% 1% 1% 100%
C gcc 0.62 125,340 812 0.62 3% 0% 0% 100%
k-nucleotide
source secs mem gz cpu cpu load
Python 3 317.42 219,028 1937 317.16 0% 1% 1% 100%
C gcc 23.93 126,832 1500 23.91 0% 1% 1% 100%
fasta
source secs mem gz cpu cpu load
Python 3 122.25 6,508 977 122.19 1% 1% 1% 100%
C gcc 2.79 640 1261 2.79 1% 1% 0% 100%
binary-trees
source secs mem gz cpu cpu load
Python 3 497.80 482,656 596 497.40 1% 1% 1% 100%
C gcc 9.58 100,796 906 9.57 1% 1% 1% 100%
mandelbrot
source secs mem gz cpu cpu load
Python 3 1,209.01 40,500 686 1,208.52 1% 0% 1% 100%
C gcc 19.08 32,016 782 19.07 0% 23% 78% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Python 3 2,464.08 44,564 944 2,463.20 1% 0% 0% 100%
C gcc 24.19 636 1183 24.18 1% 1% 0% 100%
n-body
source secs mem gz cpu cpu load
Python 3 1,024.87 6,324 1228 1,024.54 1% 0% 1% 100%
C gcc 10.01 740 1490 10.00 1% 1% 0% 100%
spectral-norm
source secs mem gz cpu cpu load
Python 3 1,105.41 7,120 328 1,105.02 1% 0% 0% 100%
C gcc 7.85 1,628 569 7.85 1% 1% 1% 100%
Python 3

Python 3.5.0 (default, Sep 14 2015, 09:36:50) [GCC 4.9.2] on linux

C gcc

gcc (Ubuntu 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609