The Computer Language
Benchmarks Game

Perl programs versus Ruby

by benchmark task performance

spectral-norm
source secs mem gz cpu cpu load
Perl 41.10 10,800 551 156.09 98% 94% 94% 94%
Ruby 141.49 50,156 835 544.76 96% 97% 96% 97%
k-nucleotide
source secs mem gz cpu cpu load
Perl 63.38 1,131,644 648 230.49 92% 90% 95% 89%
Ruby 101.95 381,312 852 367.82 84% 98% 85% 95%
reverse-complement
source secs mem gz cpu cpu load
Perl 2.67 378,924 284 2.67 100% 0% 1% 0%
Ruby 4.03 505,656 509 7.14 51% 83% 37% 9%
fannkuch-redux
source secs mem gz cpu cpu load
Perl 525.84 12,832 565 2,063.84 98% 97% 100% 98%
Ruby 710.58 33,348 1426 2,761.73 99% 99% 95% 97%
fasta
source secs mem gz cpu cpu load
Perl 98.16 53,760 838 98.12 99% 1% 1% 1%
Ruby 108.36 107,984 973 108.32 7% 10% 75% 10%
n-body
source secs mem gz cpu cpu load
Perl 758.94 5,052 1401 758.74 1% 1% 100% 1%
Ruby 723.69 8,916 1137 723.48 25% 86% 1% 9%
pidigits
source secs mem gz cpu cpu load
Perl 3.53 6,836 261 3.52 0% 0% 1% 100%
Ruby 3.14 477,092 478 3.12 0% 100% 2% 1%
mandelbrot
source secs mem gz cpu cpu load
Perl 772.49 45,540 579 3,085.63 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 213.12 1,385,276 706 716.32 97% 72% 96% 72%
Ruby 58.72 192,132 1123 166.36 67% 61% 68% 90%
regex-redux
source secs mem gz cpu cpu load
  No program contribute your program
Ruby 0.37 1,380 424 0.35 32% 41% 14% 32%
Perl

This is perl 5, version 24, subversion 0 (v5.24.0) built for x86_64-linux-thread-multi

Ruby

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