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 Ruby 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 Ruby 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
 fannkuch-redux †1/5 ±
 reverse-complement1/3±
 spectral-norm1/2 1/2
 k-nucleotide †1/2±
 fasta± ±
 fasta-redux± ±
 regex-dna±1/2±
 binary-trees †±
 pidigits± 1/2
 mandelbrot 1/2
 n-body ±
 Perl used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/51/51/2±±

† possible mismatch - one-core program compared to multi-core program.

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

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 fannkuch-redux 
Perl2,112.88531.888,720565  100% 99% 99% 99% †
Ruby2,433.052,433.757,508384  0% 0% 0% 100% †
 reverse-complement 
Perl2.902.90374,704284  0% 0% 0% 100%
Ruby8.358.36130,032255  0% 100% 1% 0%
 spectral-norm 
Perl183.4747.039,340551  98% 97% 98% 97%
Ruby379.9798.7042,696828  96% 96% 97% 97%
 k-nucleotide 
Perl240.6070.321,886,164648  84% 90% 82% 87% †
Ruby112.75112.79501,972449  1% 100% 0% 0% †
 fasta 
Perl104.98105.03100,328838  0% 100% 0% 0%
Ruby146.20151.337,520987  27% 30% 7% 39%
 fasta-redux 
Perl82.0582.082,656854  62% 1% 39% 1%
Ruby111.03111.08251,648772  0% 1% 1% 100%
 regex-dna 
Perl30.7511.21141,108527  49% 70% 76% 80%
Ruby34.1615.00291,124501  42% 41% 91% 54%
 binary-trees 
Perl755.68211.701,593,648706  78% 95% 96% 89% †
Ruby186.27186.40894,240412  1% 100% 1% 1% †
 pidigits 
Perl4.374.384,316261  1% 0% 0% 100%
Ruby3.283.29639,156478  1% 3% 1% 100%
 mandelbrot 
Perl3,308.66828.0041,196579  100% 100% 100% 100%
Ruby2,167.48544.78179,936925  100% 100% 100% 100%
 n-body 
Perl1,095.451,095.802,6481401  0% 0% 0% 100%
Ruby662.33662.517,5041137  0% 1% 0% 100%

† possible mismatch - one-core program compared to multi-core program.

 4 : Are there other Perl programs for these benchmarks?

Remember - those are just the fastest Perl and Ruby 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 Ruby 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 x86_64-linux-thread-multi

Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS
                        PERL_DONT_CREATE_GVSV
                        PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
                        PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
                        PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_64_BIT_ALL
                        USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
                        USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
                        USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
                        USE_REENTRANT_API

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

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

Revised BSD license

  Home   Conclusions   License   Play