/mobile Handheld Friendly website
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.
Look at speed another way - look at a box plot of Time-used data.
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 | |
| binary-trees | 1/5 | 1/2 | ± | |
| k-nucleotide | ± | 4× | ± | |
| reverse-complement | ± | ± | ± | |
| n-body | ± | 1/2 | ± | |
| recursive | ± | 1/2 | ± | |
| nsieve | ± | ± | ± | |
| pidigits | ± | 1/2 | ± | |
| nsieve-bits | ± | ± | ± | |
| partial-sums | ± | 1/2 | ± | |
| mandelbrot | ± | 1/2 | 1/2 | |
| fasta | ± | 1/2 | ± | |
| regex-dna | ± | ± | ± | |
| spectral-norm | ± | 1/2 | ± | |
| C GNU gcc used what fraction? used how many times more? | |||||||
|---|---|---|---|---|---|---|---|
| Time-used | |- | |--- | 25% | median | 75% | ---| | -| |
| (CPU secs) | 1/5 | ± | ± | ± | ± | ± | ± |
± 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 |
|---|---|---|---|---|---|
| binary-trees | |||||
| C GNU gcc | 0.85 | 3,900 | 758 | ||
| C++ GNU g++ | 4.47 | 6,996 | 541 | ||
| 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 | ||
| n-body | |||||
| C GNU gcc | 13.86 | 396 | 1186 | ||
| C++ GNU g++ | 14.62 | 932 | 1705 | ||
| recursive | |||||
| C GNU gcc | 2.36 | 432 | 547 | ||
| C++ GNU g++ | 2.40 | 1,008 | 566 | ||
| nsieve | |||||
| C GNU gcc | 2.07 | 5,320 | 321 | ||
| C++ GNU g++ | 2.08 | 5,764 | 313 | ||
| pidigits | |||||
| C GNU gcc | 1.66 | 592 | 680 | ||
| C++ GNU g++ | 1.66 | 1,052 | 652 | ||
| nsieve-bits | |||||
| C GNU gcc | 3.86 | 2,888 | 434 | ||
| C++ GNU g++ | 3.86 | 3,316 | 494 | ||
| partial-sums | |||||
| C GNU gcc | 4.06 | 352 | 718 | ||
| C++ GNU g++ | 4.05 | 852 | 531 | ||
| mandelbrot | |||||
| C GNU gcc | 3.09 | 372 | 563 | ||
| C++ GNU g++ | 3.02 | 896 | 1097 | ||
| fasta | |||||
| C GNU gcc | 20.31 | 372 | 1221 | ||
| 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 | ||
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/