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 C++ GNU g++ 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 C++ GNU g++ program.
| C GNU gcc used what fraction? used how many times more? | ||||
|---|---|---|---|---|
| Benchmark | Time | Memory | Code | |
| fannkuch | ± | 1/2 | ± | |
| k-nucleotide | ± | 4× | ± | |
| reverse-complement | ± | ± | ± | |
| pidigits | ± | 1/2 | ± | |
| mandelbrot | ± | 1/2 | 1/2 | |
| n-body | ± | 1/2 | ± | |
| partial-sums | ± | 1/2 | ± | |
| fasta | ± | 1/2 | ± | |
| regex-dna | ± | ± | ± | |
| spectral-norm | ± | 1/2 | ± | |
| nsieve-bits | ± | ± | ± | |
| recursive | ± | 1/3 | ± | |
| nsieve | 2× | 4× | ± | |
| binary-trees | 3× | 2× | ± | |
± 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 C++ GNU g++ program.
| Program Source Code | CPU secs | Elapsed secs | Memory KB | Code B | ≈ CPU Load |
|---|---|---|---|---|---|
| fannkuch | |||||
| C GNU gcc | 0.05 | 392 | 628 | ||
| C++ GNU g++ | 0.06 | 844 | 554 | ||
| k-nucleotide | |||||
| C GNU gcc | 6.57 | 35,372 | 1175 | ||
| C++ GNU g++ | 7.46 | 9,304 | 1380 | ||
| reverse-complement | |||||
| C GNU gcc | 0.49 | 12,852 | 736 | ||
| C++ GNU g++ | 0.54 | 13,288 | 810 | ||
| pidigits | |||||
| C GNU gcc | 0.06 | 488 | 680 | ||
| C++ GNU g++ | 0.07 | 948 | 652 | ||
| mandelbrot | |||||
| C GNU gcc | 0.14 | 372 | 563 | ||
| C++ GNU g++ | 0.14 | 896 | 1097 | ||
| n-body | |||||
| C GNU gcc | 13.86 | 396 | 1186 | ||
| C++ GNU g++ | 14.62 | 932 | 1705 | ||
| partial-sums | |||||
| C GNU gcc | 3.19 | 404 | 479 | ||
| C++ GNU g++ | 3.21 | 952 | 709 | ||
| fasta | |||||
| C GNU gcc | 19.84 | 488 | 1268 | ||
| C++ GNU g++ | 18.72 | 788 | 1248 | ||
| regex-dna | |||||
| C GNU gcc | 6.09 | 13,360 | 1099 | ||
| C++ GNU g++ | 5.58 | 12,704 | 1588 | ||
| spectral-norm | |||||
| C GNU gcc | 26.85 | 428 | 382 | ||
| C++ GNU g++ | 23.84 | 900 | 442 | ||
| nsieve-bits | |||||
| C GNU gcc | 0.72 | 1,568 | 441 | ||
| C++ GNU g++ | 0.62 | 1,440 | 494 | ||
| recursive | |||||
| C GNU gcc | 0.20 | 340 | 547 | ||
| C++ GNU g++ | 0.16 | 884 | 566 | ||
| nsieve | |||||
| C GNU gcc | 2.07 | 5,320 | 321 | ||
| C++ GNU g++ | 1.29 | 1,468 | 379 | ||
| binary-trees | |||||
| C GNU gcc | 0.85 | 3,900 | 758 | ||
| C++ GNU g++ | 0.26 | 2,192 | 814 | ||
| chameneos-redux | |||||
| C GNU gcc | |||||
| C++ GNU g++ | 0.21 | 936 | 1729 | ||
Remember - those are just the fastest C GNU gcc and C++ GNU g++ 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 C++ GNU g++ 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/