The Computer Language
24.11 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 139.05 21,120 1462 521.30
Ruby yjit 1,354.19 20,864 391 1,354.14
Ruby yjit #8 1,980.46 20,736 418 1,980.37
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 186.79 20,864 1169 186.79
Ruby yjit #2 215.78 20,864 1143 215.77
Ruby yjit #8 388.21 21,376 1160 388.20
Ruby yjit #7 704.57 21,120 1139 704.53
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 150.28 86,144 978 600.37
Ruby yjit #4 652.14 135,516 853 652.89
Ruby yjit #2 254.39 93,952 887 1,016.26
Ruby yjit #8 1,507.03 21,428 364 1,506.75
Ruby yjit #3 1,588.59 20,992 313 1,588.52
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   Failed  
Matz's Ruby #7   Failed  
Matz's Ruby #8   Timed Out  
Ruby yjit #7   Failed  
fasta
source secs mem gz cpu secs
Ruby yjit #6 31.90 120,832 1097 31.90
Ruby yjit #3 43.90 120,576 1035 43.90
Ruby yjit #5 90.76 23,168 1000 90.75
Ruby yjit #4 95.10 266,624 864 95.09
Ruby yjit #2 106.06 147,176 747 106.05
Ruby yjit #8 188.45 21,428 700 187.83
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 #2 252.78 181,808 426 252.58
Ruby yjit #3 277.67 207,596 546 277.88
Ruby yjit #7 300.36 392,960 792 298.86
Ruby yjit 86.11 171,696 583 302.91
Matz's Ruby #2 494.81 168,320 426 494.52
Matz's Ruby 192.78 147,368 583 625.23
Matz's Ruby #3 724.97 168,832 546 724.54
Ruby yjit #8 788.25 572,736 529 787.84
Matz's Ruby #8   Failed  
Matz's Ruby #7   Failed  
reverse-complement
source secs mem gz cpu secs
Ruby yjit #4 5.88 2,510,920 608 11.51
Ruby yjit #5 14.12 1,623,336 301 14.11
Ruby yjit #3 8.95 4,235,052 490 17.34
Matz's Ruby #3 9.49 3,467,256 490 17.96
Matz's Ruby #2 23.61 688,216 272 23.61
Ruby yjit #2 27.45 1,001,920 272 27.45
Ruby yjit 18.31 5,141,976 521 35.91
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 47.23 478,464 371 47.22
Ruby yjit 48.86 478,592 383 48.85
Ruby yjit #2 48.90 524,800 385 48.89
Ruby yjit #3 49.82 517,080 407 49.81
Ruby yjit #5 19.08 521,972 1016 54.19
Ruby yjit #8 130.97 478,720 494 130.95
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
Ruby yjit #5 1.50 1,011,072 494 1.50
Matz's Ruby #5 1.52 285,696 488 1.52
Ruby yjit #2 3.10 2,431,144 666 3.09
Ruby yjit 17.73 104,576 524 17.72
Matz's Ruby #2   Failed  
Matz's Ruby   Bad Output  
regex-redux
source secs mem gz cpu secs
Ruby yjit #2 22.86 216,576 444 22.87
Ruby yjit #3 11.84 216,576 730 23.97
Ruby yjit #9 29.92 216,704 340 29.91
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.3.5
(2024-09-03
revision ef084cc8f4)
+YJIT [x86_64-linux]

Matz's Ruby

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