/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 Ruby JRuby 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 Ruby JRuby 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
 mandelbrot1/52 
 fasta1/49 
 n-body1/43 ±
 spectral-norm1/38 
 fannkuch-redux1/32 
 reverse-complement1/311/5
 regex-dna1/91/3
 pidigits1/8 
 binary-trees1/51/14
 k-nucleotide1/21/12
 C gcc used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/521/521/431/311/81/41/2

± 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 Ruby JRuby program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 mandelbrot 
C gcc22.6022.6130,440799  0% 0% 1% 100%
Ruby JRuby1,177.891,179.89618,712307  0% 1% 1% 100%
 fasta 
C gcc5.045.052961221  1% 0% 1% 100%
Ruby JRuby245.09247.41615,692760  0% 1% 1% 100%
 n-body 
C gcc9.939.943441490  0% 0% 1% 100%
Ruby JRuby427.21427.86632,1801137  0% 1% 1% 100%
 spectral-norm 
C gcc7.847.85652569  0% 0% 1% 100%
Ruby JRuby294.82295.25605,320326  0% 1% 1% 100%
 fannkuch-redux 
C gcc27.2427.253281183  1% 0% 0% 100%
Ruby JRuby877.70877.97616,088384  0% 1% 1% 100%
 reverse-complement 
C gcc0.820.83248,640741  0% 0% 2% 100%
Ruby JRuby25.2725.301,189,288255  0% 1% 0% 100%
 regex-dna 
C gcc5.765.77288,8322579  1% 1% 1% 100%
Ruby JRuby49.1649.201,003,532343  0% 1% 1% 100%
 pidigits 
C gcc2.492.49868448  2% 0% 0% 100%
Ruby JRuby20.8120.86610,700240  0% 1% 1% 100%
 binary-trees 
C gcc33.4033.4266,104706  0% 0% 0% 100%
Ruby JRuby168.68168.87899,264439  1% 1% 1% 100%
 k-nucleotide 
C gcc39.5339.56153,4362280  0% 1% 1% 100%
Ruby JRuby94.3094.391,820,684449  0% 1% 1% 100%
 fasta-redux 
C gcc0.020.02?1321  0% 0% 0% 67%
No program

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

Remember - those are just the fastest C gcc and Ruby JRuby 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 Ruby JRuby 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