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 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 Perl programs faster? Approximately.

Each table row shows, for one named benchmark, how much the fastest Perl program used compared to the fastest Ruby JRuby 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
 reverse-complement †1/61/3±
 spectral-norm †1/5 
 pidigits †1/3 ±
 fasta1/2 ±
 regex-dna±1/6±
 k-nucleotide †±±±
 mandelbrot± ±
 fannkuch-redux± 1/3
 binary-trees±
 n-body ±
 Perl used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/61/61/3±±

† 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 JRuby program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 reverse-complement 
Perl2.902.90374,704284  0% 0% 0% 100% †
Ruby JRuby24.8418.241,284,372255  22% 14% 14% 88% †
 spectral-norm 
Perl183.4747.039,340551  98% 97% 98% 97% †
Ruby JRuby250.63243.93673,640326  21% 24% 31% 28% †
 pidigits 
Perl4.374.384,316261  1% 0% 0% 100% †
Ruby JRuby18.5412.70666,456242  18% 46% 66% 17% †
 fasta 
Perl104.98105.03100,328838  0% 100% 0% 0%
Ruby JRuby214.27207.73664,912760  27% 35% 20% 22%
 regex-dna 
Perl30.7511.21141,108527  49% 70% 76% 80%
Ruby JRuby49.5816.58787,976507  69% 67% 81% 84%
 k-nucleotide 
Perl240.6070.321,886,164648  84% 90% 82% 87% †
Ruby JRuby85.3580.181,870,964449  8% 37% 20% 45% †
 mandelbrot 
Perl3,308.66828.0041,196579  100% 100% 100% 100%
Ruby JRuby3,308.31847.98762,944866  98% 98% 98% 98%
 fannkuch-redux 
Perl2,112.88531.888,720565  100% 99% 99% 99%
Ruby JRuby1,296.44357.64684,4681426  90% 92% 99% 82%
 binary-trees 
Perl755.68211.701,593,648706  78% 95% 96% 89%
Ruby JRuby157.7997.791,168,552402  52% 25% 25% 68%
 n-body 
Perl1,095.451,095.802,6481401  0% 0% 0% 100%
Ruby JRuby382.88375.10755,9801137  23% 23% 28% 29%
 fasta-redux 
Perl0.861.062,604854  84% 1% 6% 11%
No program

† 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 JRuby 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 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.

 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