The Computer Language
Benchmarks Game

Perl programs versus Ruby

by benchmark task performance

spectral-norm
source secs mem gz cpu cpu load
Perl 153.68 5,152 340 153.63 1% 0% 1% 100%
Ruby 520.06 7,584 326 519.86 0% 1% 100% 100%
k-nucleotide
source secs mem gz cpu cpu load
Perl 203.61 466,864 359 200.59 1% 1% 1% 100%
Ruby 672.83 160,276 420 672.50 0% 2% 99% 100%
reverse-complement
source secs mem gz cpu cpu load
Perl 2.84 377,584 284 2.83 0% 1% 0% 100%
Ruby 6.17 541,352 509 6.14 0% 1% 1% 100%
fasta
source secs mem gz cpu cpu load
Perl 93.46 52,992 838 93.42 1% 1% 1% 100%
Ruby 197.80 197,072 904 197.62 1% 1% 100% 100%
n-body
source secs mem gz cpu cpu load
Perl 717.07 3,992 1401 716.84 1% 1% 1% 100%
Ruby 1,429.79 7,284 1137 1,429.24 1% 18% 83% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Perl 1,697.45 3,240 427 1,696.90 1% 1% 1% 100%
Ruby 2,604.22 7,112 384 2,603.32 1% 17% 72% 100%
pidigits
source secs mem gz cpu cpu load
Perl 4.51 5,452 261 4.51 0% 0% 1% 100%
Ruby 4.04 626,044 478 4.02 0% 1% 1% 100%
binary-trees
source secs mem gz cpu cpu load
Perl 488.62 209,208 448 488.38 1% 1% 1% 100%
Ruby 179.60 117,640 402 179.49 1% 1% 100% 100%
mandelbrot
source secs mem gz cpu cpu load
Perl   Failed
Ruby 14.57 6,996 307 14.05 1% 2% 58% 100%
Perl

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

Ruby

ruby 2.3.0p0 (2015-12-25 revision 53290) [i686-linux]