Ubuntu : Intel® Q6600® quad-core |
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 | |
| fannkuch | 1/264 | 1/5 | 2× | |
| fasta | 1/118 | 1/8 | 2× | |
| mandelbrot | 1/118 | ± | 2× | |
| spectral-norm | 1/79 | 1/34 | 3× | |
| n-body | 1/61 | 1/7 | ± | |
| binary-trees | 1/51 | 1/7 | ± | |
| pidigits | 1/20 | 1/4 | ± | |
| reverse-complement | 1/5 | 1/4 | 3× | |
| k-nucleotide | 1/5 | 1/3 | 5× | |
| regex-dna | 1/4 | ± | 8× | |
± 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 |
|---|---|---|---|---|---|
| fannkuch | |||||
| C GNU gcc | 47.44 | 12.23 | 560 | 937 | 96% 100% 96% 98% |
| Python CPython | 3,232.09 | 3,231.90 | 2,852 | 387 | 36% 8% 48% 7% |
| fasta | |||||
| C GNU gcc | 1.76 | 1.76 | 376 | 1321 | 99% 1% 0% 1% |
| Python CPython | 208.55 | 208.54 | 2,928 | 779 | 61% 23% 4% 12% |
| mandelbrot | |||||
| C GNU gcc | 24.33 | 6.11 | 27,940 | 879 | 100% 100% 100% 100% |
| Python CPython | 2,882.02 | 720.54 | 23,468 | 425 | 100% 100% 100% 100% |
| spectral-norm | |||||
| C GNU gcc | 12.17 | 3.07 | 688 | 1139 | 100% 100% 98% 100% |
| Python CPython | 942.71 | 242.94 | 23,632 | 428 | 98% 97% 98% 95% |
| n-body | |||||
| C GNU gcc | 23.53 | 23.52 | 412 | 1429 | 0% 100% 0% 0% |
| Python CPython | 1,443.10 | 1,443.02 | 2,932 | 1105 | 86% 7% 1% 7% |
| binary-trees | |||||
| C GNU gcc | 13.55 | 5.48 | 100,696 | 850 | 72% 35% 76% 63% |
| Python CPython | 980.23 | 279.06 | 674,024 | 626 | 86% 89% 85% 90% |
| pidigits | |||||
| C GNU gcc | 2.71 | 2.72 | 1,008 | 541 | 1% 1% 0% 100% |
| Python CPython | 54.74 | 54.74 | 3,596 | 407 | 100% 0% 0% 0% |
| reverse-complement | |||||
| C GNU gcc | 1.36 | 1.36 | 125,196 | 722 | 4% 100% 0% 1% |
| Python CPython | 6.78 | 6.78 | 561,860 | 288 | 0% 40% 61% 0% |
| k-nucleotide | |||||
| C GNU gcc | 54.46 | 17.25 | 161,756 | 2439 | 89% 56% 83% 88% |
| Python CPython | 277.72 | 84.94 | 441,680 | 519 | 54% 94% 82% 96% |
| regex-dna | |||||
| C GNU gcc | 6.32 | 3.10 | 282,364 | 2579 | 50% 40% 55% 60% |
| Python CPython | 11.73 | 11.73 | 196,492 | 314 | 0% 0% 100% 0% |
| chameneos-redux | |||||
| Python CPython | 2.36 | 1.94 | 3,020 | 869 | 36% 24% 51% 15% |
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.4.1 (Ubuntu 4.4.1-4ubuntu8)
Online book: The C Book
Home Page: http://gcc.gnu.org/
Download: ftp://ftp.gnu.org/pub/gnu/gcc/