The Computer Language
24.12 Benchmarks Game

Ruby yjit versus Matz's Ruby fastest performance

How the programs are written matters! 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 seconds, less gz source code.

fannkuch-redux
source secs mem gz cpu secs
Ruby yjit #2 152.41 19,680 1462 591.05
Ruby yjit 1,451.71 19,680 391 1,451.48
Ruby yjit #8 1,932.07 19,680 418 1,931.76
Matz's Ruby 11,546.89 19,856 391 11,545.67
Matz's Ruby #2 4,344.60 19,856 1462 16,709.41
Matz's Ruby #8   Timed Out  
n-body
source secs mem gz cpu secs
Ruby yjit #3 166.55 19,620 1169 166.53
Ruby yjit #2 172.26 19,620 1143 172.23
Ruby yjit #8 317.96 19,620 1160 317.90
Ruby yjit #7 769.49 19,620 1139 769.35
Matz's Ruby #2 2,609.93 19,860 1143 2,609.82
Matz's Ruby #3 2,638.72 19,684 1169 2,638.61
Matz's Ruby #8 3,244.16 19,436 1160 3,244.02
Matz's Ruby #7   Failed  
spectral-norm
source secs mem gz cpu secs
Ruby yjit #4 128.52 22,656 333 128.51
Ruby yjit #8 168.99 21,120 294 168.99
Ruby yjit #5 57.89 27,264 764 212.15
Matz's Ruby #8 1,673.61 19,440 294 1,673.54
Matz's Ruby #4 1,732.01 19,936 333 1,731.93
Matz's Ruby #5 645.49 19,680 764 2,394.09
mandelbrot
source secs mem gz cpu secs
Ruby yjit #5 141.70 79,248 978 565.92
Ruby yjit #4 578.95 126,996 853 579.53
Ruby yjit #2 165.71 87,360 887 660.93
Ruby yjit #8 942.59 19,620 364 942.41
Ruby yjit #3 1,695.20 19,620 313 1,694.90
Matz's Ruby #3 8,671.67 19,860 313 8,671.20
Matz's Ruby #4 8,970.88 147,424 853 8,969.84
Matz's Ruby #5 2,428.42 68,480 978 9,703.31
Matz's Ruby #6 2,675.27 193,792 890 10,067.31
Matz's Ruby #2 2,716.14 71,168 887 10,848.35
Ruby yjit #6   Timed Out  
Matz's Ruby #7   Failed  
Matz's Ruby #8   Timed Out  
Ruby yjit #7   Timed Out  
fasta
source secs mem gz cpu secs
Ruby yjit #6 34.00 113,008 1097 33.99
Ruby yjit #3 43.54 113,048 1035 43.53
Ruby yjit #2 82.85 136,432 747 82.83
Ruby yjit #5 99.25 19,620 1000 99.23
Ruby yjit #4 142.74 294,212 864 142.15
Ruby yjit #8 190.64 19,620 700 190.20
Matz's Ruby #4 323.36 275,584 864 322.99
Matz's Ruby #5 364.88 19,688 1000 364.66
Matz's Ruby #2 429.16 248,360 747 429.13
Matz's Ruby #8 787.93 19,780 700 787.46
Matz's Ruby #3   Failed  
Matz's Ruby #6   Failed  
k-nucleotide
source secs mem gz cpu secs
Ruby yjit #7 255.31 385,864 792 253.65
Ruby yjit #2 263.04 171,524 426 262.74
Ruby yjit #3 300.38 198,360 546 300.61
Ruby yjit 87.40 162,976 583 318.58
Matz's Ruby #2 494.81 168,320 426 494.52
Ruby yjit #8 529.77 599,256 529 529.29
Matz's Ruby 192.78 147,368 583 625.23
Matz's Ruby #3 724.97 168,832 546 724.54
Matz's Ruby #8   Failed  
Matz's Ruby #7   Failed  
reverse-complement
source secs mem gz cpu secs
Ruby yjit #4 6.11 2,491,828 608 11.94
Ruby yjit #5 13.38 1,602,784 301 13.37
Ruby yjit #3 8.36 4,458,064 490 16.48
Matz's Ruby #3 9.49 3,467,256 490 17.96
Ruby yjit #2 19.55 503,176 272 19.54
Matz's Ruby #2 23.61 688,216 272 23.61
Ruby yjit 13.21 5,556,616 521 25.63
Matz's Ruby   Failed  
Matz's Ruby #5   Failed  
Matz's Ruby #4   Failed  
binary-trees
source secs mem gz cpu secs
Ruby yjit #4 46.97 472,012 371 46.94
Ruby yjit 48.77 471,992 383 48.75
Ruby yjit #2 48.83 471,996 385 48.80
Ruby yjit #3 49.58 507,116 407 49.55
Ruby yjit #5 18.85 473,532 1016 53.80
Ruby yjit #8 135.03 471,944 494 134.99
Matz's Ruby #3 592.42 840,268 407 592.35
Matz's Ruby #4 723.77 1,559,040 371 723.68
Matz's Ruby 791.07 1,558,912 383 791.00
Matz's Ruby #2 791.39 1,559,040 385 791.30
Matz's Ruby #5 336.77 1,559,164 1016 1,066.65
Matz's Ruby #8   Timed Out  
pidigits
source secs mem gz cpu secs
Matz's Ruby #5 1.52 285,696 488 1.52
Ruby yjit 18.03 49,168 524 18.03
Ruby yjit #2   Failed  
Matz's Ruby #2   Failed  
Ruby yjit #5   Failed  
Matz's Ruby   Bad Output  
regex-redux
source secs mem gz cpu secs
Ruby yjit #2 23.47 212,160 444 23.47
Ruby yjit #3 12.36 208,604 730 24.37
Ruby yjit #9 30.70 212,104 340 30.69
Matz's Ruby #2 34.55 230,016 444 34.55
Matz's Ruby #3 16.32 230,016 730 36.32
Matz's Ruby #9 41.08 230,016 340 41.07
Ruby yjit

ruby 3.4.0dev
(2024-12-25
master f450108330)
+YJIT +PRISM [x86_64-linux]

Matz's Ruby

ruby 1.8.7
(2014-01-28
patchlevel 376)
[x86_64-linux]