The Computer Language
22.05 Benchmarks Game

Fastest cpu secs Ruby versus Matz's Ruby

Always look at the source code.

If the fastest programs are hand-written vector instructions, does the host language matter? You might be more interested in the less optimised programs — more cpu seconds, less gz source code.

fannkuch-redux
source mem gz cpu
Ruby #2 288,852 1455 1,010.75
Ruby 285,268 384 1,748.13
Matz's Ruby 4,612 384 10,624.15
Matz's Ruby #2 17,512 1455 13,951.98
n-body
source mem gz cpu
Ruby #3 285,504 1163 219.69
Ruby #2 285,552 1137 224.66
Matz's Ruby #2 3,816 1137 2,279.83
Matz's Ruby #3 3,800 1163 2,331.68
spectral-norm
source mem gz cpu
Ruby #4 287,424 326 113.59
Ruby 286,944 292 142.22
Ruby #5 288,548 758 216.98
Matz's Ruby 6,080 292 1,343.32
Matz's Ruby #4 5,928 326 1,428.76
Matz's Ruby #5 19,728 758 2,050.28
mandelbrot
source mem gz cpu
Ruby #5 324,320 970 655.37
Ruby #4 409,304 857 857.98
Ruby #2 361,904 880 1,069.66
Ruby #3 285,212 307 1,470.34
Matz's Ruby #3 3,208 307 7,407.73
Matz's Ruby #4 103,948 857 7,731.43
Matz's Ruby #5 53,240 970 7,829.23
Matz's Ruby #6 131,576 918 9,092.86
Matz's Ruby #2 64,428 880 9,457.26
Matz's Ruby #7   Failed  
Ruby #7   Failed  
Ruby #6   Failed  
pidigits
source mem gz cpu
Ruby #5 846,476 485 1.69
Ruby #2 613,348 658 2.74
Ruby 451,736 518 17.65
Matz's Ruby #5   Failed  
Matz's Ruby #2   Failed  
Matz's Ruby   Bad Output  
regex-redux
source mem gz cpu
Ruby #3 649,832 724 23.22
Ruby #2 684,764 437 23.23
Ruby #9 678,228 321 25.87
Matz's Ruby #2 223,516 437 34.45
Matz's Ruby #3 223,648 724 36.10
Matz's Ruby #9 223,480 334 41.74
fasta
source mem gz cpu
Ruby #6 340,624 1069 27.24
Ruby #3 337,560 1002 50.87
Ruby #4 541,176 860 97.62
Ruby #5 286,228 995 98.69
Ruby #2 480,812 743 153.89
Matz's Ruby #3 101,684 1020 266.85
Matz's Ruby #4 277,768 860 301.41
Matz's Ruby #5 4,308 995 341.15
Matz's Ruby #2 248,288 743 398.00
Matz's Ruby #6   Failed  
k-nucleotide
source mem gz cpu
Ruby #2 455,288 420 243.58
Ruby #7 657,660 785 271.49
Ruby 408,036 576 281.84
Ruby #3 461,428 540 282.00
Matz's Ruby #2 168,112 420 455.40
Matz's Ruby 126,732 576 571.50
Matz's Ruby #3 168,588 540 689.10
Matz's Ruby #7 452,440 870 1,985.07
reverse-complement
source mem gz cpu
Ruby #5 1,874,980 295 11.49
Ruby #3 2,272,876 482 19.15
Ruby #2 774,468 264 19.40
Matz's Ruby #2 492,816 264 21.00
Ruby #4 2,273,936 601 22.60
Ruby 2,273,352 514 32.89
Matz's Ruby #3   Bad Output  
Matz's Ruby   Failed  
Matz's Ruby #5   Failed  
Matz's Ruby #4   Failed  
binary-trees
source mem gz cpu
Ruby #4 667,224 364 68.23
Ruby 667,228 376 71.73
Ruby #3 896,992 400 72.06
Ruby #2 667,172 378 72.24
Ruby #5 671,376 1008 75.52
Matz's Ruby #3 840,244 400 567.64
Matz's Ruby #4 1,560,732 364 687.80
Matz's Ruby 1,559,732 376 746.00
Matz's Ruby #2 1,558,884 378 762.85
Matz's Ruby #5 1,413,456 1008 992.98
Ruby

ruby 3.1.2p20
(2022-04-12
revision 4491bb740a)
[x86_64-linux] --yjit

Matz's Ruby

ruby 1.8.7
(2008-08-11
patchlevel 72)
[x86_64-linux]
 
So old that I haven't been
able to get rubygems to work
no backport, no gmp