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 141.49 50,156 835 544.76 96% 97% 96% 97%
regex-redux
source secs mem gz cpu cpu load
Perl 14.66 155,708 820 43.59 63% 86% 53% 96%
Ruby 28.80 309,760 424 28.77 15% 48% 20% 19%
reverse-complement
source secs mem gz cpu cpu load
Perl 2.48 377,192 287 2.48 1% 0% 0% 100%
Ruby 4.03 505,656 509 7.14 51% 83% 37% 9%
k-nucleotide
source secs mem gz cpu cpu load
Perl 64.22 1,068,544 476 215.42 78% 78% 83% 97%
Ruby 101.95 381,312 852 367.82 84% 98% 85% 95%
fannkuch-redux
source secs mem gz cpu cpu load
Perl 570.21 11,260 570 2,198.55 96% 99% 95% 97%
Ruby 710.58 33,348 1426 2,761.73 99% 99% 95% 97%
fasta
source secs mem gz cpu cpu load
Perl 99.64 54,044 871 99.61 0% 1% 0% 100%
Ruby 108.36 107,984 973 108.32 7% 10% 75% 10%
n-body
source secs mem gz cpu cpu load
Perl 710.66 5,244 1429 710.51 0% 1% 0% 100%
Ruby 723.69 8,916 1137 723.48 25% 86% 1% 9%
pidigits
source secs mem gz cpu cpu load
Perl 3.50 7,348 261 3.50 100% 1% 1% 1%
Ruby 3.14 477,092 478 3.12 0% 100% 2% 1%
mandelbrot
source secs mem gz cpu cpu load
Perl 729.09 42,964 586 2,912.27 100% 100% 100% 100%
Ruby 463.95 69,656 1019 1,852.06 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 54.24 510,868 1078 153.99 73% 98% 67% 72%
Perl

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

Ruby

ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]