/mobile Handheld Friendly website

vs

 1 : Are the C gcc programs faster? At a glance.

Each chart bar shows, for one unidentified benchmark, how much the fastest C gcc program used compared to the fastest JavaScript V8 program.

(Memory use is only compared for tasks that require memory to be allocated.)


These are not the only compilers and interpreters. These are not the only programs that could be written. These are not the only tasks that could be solved. These are just 10 tiny examples.

 2 : Are the C gcc programs faster? Approximately.

Each table row shows, for one named benchmark, how much the fastest C gcc program used compared to the fastest JavaScript V8 program.

(Memory use is only compared for tasks that require memory to be allocated.)

 C gcc used what fraction? used how many times more? 
Benchmark Time Memory Code
 reverse-complement1/11±±
 n-body1/4 ±
 fasta1/3 
 fannkuch-redux1/3 
 k-nucleotide1/2
 spectral-norm1/2 
 binary-trees±1/4
 regex-dna±±
 C gcc used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/111/111/41/3±±±

± read the measurements and then read the program source code.

 3 : Are the C gcc programs faster? Measurements.

These are not the only tasks that could be solved. These are just 10 tiny examples. These are not the only compilers and interpreters. These are not the only programs that could be written.

For each named benchmark, measurements of the fastest C gcc program are shown for comparison against measurements of the fastest JavaScript V8 program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 reverse-complement 
C gcc0.820.83248,640741  0% 0% 2% 100%
JavaScript V89.179.18240,648787  0% 0% 1% 100%
 n-body 
C gcc9.939.943441490  0% 0% 1% 100%
JavaScript V842.1242.138,6401527  0% 0% 0% 100%
 fasta 
C gcc5.045.052961221  1% 0% 1% 100%
JavaScript V817.6417.658,472791  1% 0% 0% 100%
 fannkuch-redux 
C gcc27.2427.253281183  1% 0% 0% 100%
JavaScript V875.0275.046,300539  0% 0% 0% 100%
 k-nucleotide 
C gcc39.5339.56153,4362280  0% 1% 1% 100%
JavaScript V896.3096.3938,0761249  0% 1% 1% 100%
 spectral-norm 
C gcc7.847.85652569  0% 0% 1% 100%
JavaScript V815.7015.718,340328  0% 1% 1% 100%
 binary-trees 
C gcc33.4033.4266,104706  0% 0% 0% 100%
JavaScript V839.8639.92267,848467  0% 1% 1% 100%
 regex-dna 
C gcc5.765.77288,8322579  1% 1% 1% 100%
JavaScript V83.853.86406,048373  1% 1% 0% 100%
 pidigits 
C gcc0.080.09?448  0% 0% 0% 100%
No program
 fasta-redux 
C gcc0.020.02?1321  0% 0% 0% 67%
No program
 mandelbrot 
C gcc0.090.10?799  0% 0% 0% 100%
JavaScript V8Bad Output

 4 : Are there other C gcc programs for these benchmarks?

Remember - those are just the fastest C gcc and JavaScript V8 programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for C gcc.

Maybe one of those other C gcc programs is fastest on a different OS/machine.

 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest C gcc and JavaScript V8 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.

 C gcc : unchecked low-level programming 

gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu8)

Online book: The C Book

Online book: Looking for 4x speedups? SSE to the rescue! pdf slides

Home Page: http://gcc.gnu.org/

Download: ftp://ftp.gnu.org/pub/gnu/gcc/

Revised BSD license

  Home   Conclusions   License   Play