The Computer Language
Benchmarks Game

Perl programs versus Ruby

by benchmark task performance

spectral-norm
source secs mem gz cpu cpu load
Perl 41.83 10,980 555 165.14 99% 99% 99% 98%
Ruby 119.33 49,312 835 461.61 97% 97% 97% 97%
regex-redux
source secs mem gz cpu cpu load
Perl 14.66 155,708 820 43.59 63% 86% 53% 96%
Ruby 25.64 311,964 431 25.63 6% 4% 60% 31%
reverse-complement
source secs mem gz cpu cpu load
Perl 2.48 377,192 287 2.48 1% 0% 0% 100%
Ruby 3.73 571,404 517 7.00 49% 34% 96% 10%
k-nucleotide
source secs mem gz cpu cpu load
Perl 64.22 1,068,544 476 215.42 78% 78% 83% 97%
Ruby 95.27 381,212 858 342.07 97% 86% 86% 91%
fannkuch-redux
source secs mem gz cpu cpu load
Perl 570.21 11,260 570 2,198.55 96% 99% 95% 97%
Ruby 671.17 30,416 1432 2,613.66 98% 100% 100% 92%
fasta
source secs mem gz cpu cpu load
Perl 99.64 54,044 871 99.61 0% 1% 0% 100%
Ruby 99.67 106,544 1002 99.65 0% 0% 100% 0%
n-body
source secs mem gz cpu cpu load
Perl 710.66 5,244 1429 710.51 0% 1% 0% 100%
Ruby 641.41 8,848 1137 641.26 8% 93% 0% 0%
pidigits
source secs mem gz cpu cpu load
Perl 3.50 7,348 261 3.50 100% 1% 1% 1%
Ruby 2.97 306,652 485 2.96 1% 0% 3% 100%
mandelbrot
source secs mem gz cpu cpu load
Perl 729.09 42,964 586 2,912.27 100% 100% 100% 100%
Ruby 520.83 127,152 925 2,081.07 100% 100% 100% 100%
binary-trees
source secs mem gz cpu cpu load
Perl 183.13 2,199,432 648 609.32 83% 93% 77% 81%
Ruby 47.66 511,724 1083 137.38 66% 90% 70% 63%
Perl

This is perl 5, version 26, subversion 0 (v5.26.0) built for x86_64-linux-gnu-thread-multi

Ruby

ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]