The Computer Language
24.12 Benchmarks Game

Ruby yjit versus Erlang 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
Erlang 65.58 55,108 1044 258.75
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
n-body
source secs mem gz cpu secs
Erlang #3 104.40 55,560 1405 104.46
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
spectral-norm
source secs mem gz cpu secs
Erlang #2 10.87 67,448 753 42.57
Erlang 63.88 63,040 513 63.98
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
mandelbrot
source secs mem gz cpu secs
Erlang #4 53.98 83,592 813 215.09
Erlang #3 56.99 84,792 798 227.25
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
Ruby yjit #6   Timed Out  
Erlang   Bad Output  
Erlang #2   Bad Output  
Ruby yjit #7   Timed Out  
fasta
source secs mem gz cpu secs
Erlang #2 19.29 55,904 1170 21.10
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
Erlang 84.14 55,008 1045 170.84
Ruby yjit #8 190.64 19,620 700 190.20
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
Ruby yjit #8 529.77 599,256 529 529.29
Erlang   Timed Out  
Erlang #3   Timed Out  
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
Ruby yjit #2 19.55 503,176 272 19.54
Ruby yjit 13.21 5,556,616 521 25.63
Erlang 1,593.45 2,180,832 1309 1,802.03
Erlang #4   Timed Out  
Erlang #3   Timed Out  
binary-trees
source secs mem gz cpu secs
Erlang 10.90 482,520 426 11.11
Erlang #2 4.81 478,992 485 13.06
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
pidigits
source secs mem gz cpu secs
Erlang 3.36 94,388 565 4.11
Erlang #3 3.15 68,836 568 4.20
Erlang #2 3.26 75,544 518 5.16
Ruby yjit 18.03 49,168 524 18.03
Ruby yjit #2   Failed  
Ruby yjit #5   Failed  
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
Erlang #6 21.80 4,651,256 1055 41.89
Ruby yjit

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

Erlang

Erlang/OTP 27 [erts-15.0]
[source] [64-bit] [smp:4:4]
[ds:4:4:10] [async-threads:1] [jit:ns]