OUT-OF-DATE! Read http://shootout.alioth.debian.org/ |
This chart shows 3 comparisons - Time-used, Memory-used and Code-used ~ speed and size.
Each chart bar shows, for one unidentified benchmark, how much the fastest C GNU gcc program used compared to the fastest Python CPython program.
This table shows 3 comparisons - Time-used, Memory-used and Code-used ~ speed and size.
Each table row shows, for one named benchmark, how much the fastest C GNU gcc program used compared to the fastest Python CPython program.
| C GNU gcc used what fraction? used how many times more? | ||||
|---|---|---|---|---|
| Benchmark | Time | Memory | Code | |
| n-body | 1/145 | 1/6 | ± | |
| spectral-norm | 1/121 | 1/7 | ± | |
| recursive | 1/114 | 1/9 | 2× | |
| fannkuch | 1/112 | 1/6 | 2× | |
| binary-trees | 1/79 | 1/4 | 2× | |
| nsieve-bits | 1/49 | 1/3 | 2× | |
| mandelbrot | 1/41 | 1/80 | 2× | |
| fasta | 1/35 | 1/5 | 2× | |
| k-nucleotide | 1/9 | ± | 2× | |
| reverse-complement | 1/6 | 1/4 | 3× | |
| nsieve | 1/4 | 1/8 | ± | |
| partial-sums | 1/2 | 1/31 | ± | |
| pidigits | ± | 1/4 | 3× | |
| regex-dna | 2× | 1/2 | 4× | |
± read the measurements and then read the program source code.
This table shows 5 measurements - CPU Time, Elapsed Time, Memory, Code and ≈ CPU Load ~ speed and size.
For each named benchmark, measurements of the fastest C GNU gcc program are shown for comparison against measurements of the fastest Python CPython program.
| Program Source Code | CPU secs | Elapsed secs | Memory KB | Code B | ≈ CPU Load |
|---|---|---|---|---|---|
| n-body | |||||
| C GNU gcc | 13.86 | 396 | 1186 | ||
| Python CPython | 2,015.78 | 2,440 | 1027 | ||
| spectral-norm | |||||
| C GNU gcc | 26.85 | 428 | 382 | ||
| Python CPython | 3,261.32 | 2,900 | 282 | ||
| recursive | |||||
| C GNU gcc | 0.20 | 340 | 547 | ||
| Python CPython | 22.37 | 3,048 | 360 | ||
| fannkuch | |||||
| C GNU gcc | 0.05 | 392 | 628 | ||
| Python CPython | 5.38 | 2,404 | 411 | ||
| binary-trees | |||||
| C GNU gcc | 0.85 | 3,900 | 758 | ||
| Python CPython | 66.96 | 16,172 | 377 | ||
| nsieve-bits | |||||
| C GNU gcc | 0.72 | 1,568 | 441 | ||
| Python CPython | 34.97 | 4,936 | 288 | ||
| mandelbrot | |||||
| C GNU gcc | 0.14 | 372 | 563 | ||
| Python CPython | 5.59 | 29,632 | 312 | ||
| fasta | |||||
| C GNU gcc | 19.84 | 488 | 1268 | ||
| Python CPython | 692.04 | 2,420 | 779 | ||
| k-nucleotide | |||||
| C GNU gcc | 6.57 | 35,372 | 1175 | ||
| Python CPython | 58.45 | 25,208 | 475 | ||
| reverse-complement | |||||
| C GNU gcc | 0.49 | 12,852 | 736 | ||
| Python CPython | 2.73 | 49,072 | 288 | ||
| nsieve | |||||
| C GNU gcc | 2.07 | 5,320 | 321 | ||
| Python CPython | 7.35 | 42,400 | 278 | ||
| partial-sums | |||||
| C GNU gcc | 3.19 | 404 | 479 | ||
| Python CPython | 7.03 | 12,680 | 482 | ||
| pidigits | |||||
| C GNU gcc | 0.06 | 488 | 680 | ||
| Python CPython | 0.08 | 2,164 | 257 | ||
| regex-dna | |||||
| C GNU gcc | 6.09 | 13,360 | 1099 | ||
| Python CPython | 2.88 | 23,000 | 314 | ||
| chameneos-redux | |||||
| C GNU gcc | |||||
| Python CPython | 2.73 | 2,580 | 866 | ||
Remember - those are just the fastest C GNU gcc and Python CPython programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for C GNU gcc.
Maybe one of those other C GNU gcc programs is fastest on a different OS/machine.
Remember - those are just the fastest C GNU gcc and Python CPython programs measured on this OS/machine. Check if there are faster implementations of these benchmark programs for other programming languages.
Maybe one of those other programs is fastest on a different OS/machine.
gcc version 4.1.2 (Gentoo 4.1.2)
Online book: The C Book
Home Page: http://gcc.gnu.org/
Download: ftp://ftp.gnu.org/pub/gnu/gcc/