/mobile Handheld Friendly website

vs

 1 : Are the Perl programs faster? At a glance.

Each chart bar shows, for one unidentified benchmark, how much the fastest Perl program used compared to the fastest C gcc 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 Perl programs faster? Approximately.

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

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

 Perl used what fraction? used how many times more? 
Benchmark Time Memory Code
 pidigits 1/2
 reverse-complement1/3
 k-nucleotide1/6
 regex-dna1/21/5
 binary-trees18×1/2
 fasta18× ±
 spectral-norm28× 1/2
 fasta-redux43× 1/2
 fannkuch-redux89× 1/3
 n-body114× ±
 Perl used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)18×43×100×114×

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

 3 : Are the Perl 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 Perl program are shown for comparison against measurements of the fastest C gcc program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 pidigits 
Perl5.235.243,296261  1% 0% 0% 100%
C gcc2.492.49868448  2% 0% 0% 100%
 reverse-complement 
Perl3.023.03374,264284  1% 0% 0% 100%
C gcc0.820.83248,640741  0% 0% 2% 100%
 k-nucleotide 
Perl206.30209.52707,940359  0% 0% 0% 100%
C gcc39.5339.56153,4362280  0% 1% 1% 100%
 regex-dna 
Perl30.8830.92140,068527  0% 0% 0% 100%
C gcc5.765.77288,8322579  1% 1% 1% 100%
 binary-trees 
Perl602.63603.14289,324448  0% 0% 0% 100%
C gcc33.4033.4266,104706  0% 0% 0% 100%
 fasta 
Perl92.5592.5999,672838  0% 0% 0% 100%
C gcc5.045.052961221  1% 0% 1% 100%
 spectral-norm 
Perl216.22216.313,640333  0% 0% 0% 100%
C gcc7.847.85652569  0% 0% 1% 100%
 fasta-redux 
Perl71.8371.862,000854  1% 1% 0% 100%
C gcc1.661.672961321  1% 0% 1% 100%
 fannkuch-redux 
Perl2,428.622,429.611,464457  0% 0% 0% 100%
C gcc27.2427.253281183  1% 0% 0% 100%
 n-body 
Perl1,137.101,137.561,9921401  0% 0% 0% 100%
C gcc9.939.943441490  0% 0% 1% 100%
 mandelbrot 
PerlFailed
C gcc0.090.10?799  0% 0% 0% 100%

 4 : Are there other Perl programs for these benchmarks?

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

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

 5 : Are there other faster programs for these benchmarks?

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

 Perl : server-side shell & cgi scripts 

This is perl 5, version 18, subversion 0 (v5.18.0) built for i686-linux

Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
                        PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
                        PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_LARGE_FILES
                        USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
                        USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF

Home Page: http://www.perl.org/

Download: http://www.cpan.org/src/5.0/

Revised BSD license

  Home   Conclusions   License   Play