YJIT Benchmarks

Details for Benchmarks at 2024-12-07 03:48:32 UTC

YJIT metrics from the yjit-bench suite using Ruby 8ad6860ff7.

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 89.9% faster than CRuby 3.4.0dev
  • 5.8% faster than YJIT 3.3.6
On railsbench it is
  • 102.0% faster than CRuby 3.4.0dev
  • 2.9% faster than YJIT 3.3.6
x86_64 runtime: 3 hours, 51 minutes
aarch64 runtime: 3 hours, 17 minutes

Performance on Headline Benchmarks

Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on Headline Benchmarks

Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower is better.

Performance on Other Benchmarks

Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on Other Benchmarks

Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower is better.

Performance on MicroBenchmarks

Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on MicroBenchmarks

Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower is better.

Want Raw Graphs and CSV?

Benchmarks Speed Details

Benchmark Memory Usage Details

Number of Iterations and Warmups Tested

bench CRuby 3.3.6 warmups CRuby 3.3.6 iters CRuby 3.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.3.6 warmups YJIT 3.3.6 iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 5 82 5 83 50 157 50 165
chunky-png 5 32 5 32 50 15 50 35
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 410 5 421 50 575 50 626
liquid-compile 5 410 5 411 50 547 50 556
liquid-render 5 172 5 169 50 406 50 424
lobsters 5 20 5 20 50 10 50 10
mail 5 188 5 194 50 251 50 250
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 157 5 157 50 248 50 264
ruby-lsp 5 155 5 160 50 246 50 266
sequel 5 414 5 416 50 571 50 587
binarytrees 5 83 5 81 50 144 50 142
blurhash 5 82 5 83 50 127 50 145
erubi 5 119 5 147 50 90 50 136
etanni 5 90 5 99 50 53 50 69
fannkuchredux 5 51 5 55 50 101 50 104
fluentd 5 63 5 61 50 26 50 30
graphql 5 85 5 85 50 57 50 53
graphql-native 5 49 5 52 50 10 50 14
lee 5 22 5 23 50 10 50 10
loops-times 5 24 5 23 50 48 50 64
matmul 5 51 5 53 50 84 50 96
nbody 5 247 5 253 50 577 50 717
nqueens 5 120 5 119 50 75 50 565
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 174 50 619 50 742
protoboeuf-encode 5 180 5 199 50 326 50 800
rack 5 582 5 634 50 959 50 1048
ruby-json 5 83 5 85 50 49 50 50
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 164 50 162
tinygql 5 36 5 37 50 23 50 29
30k_ifelse 5 28 5 28 50 215 50 195
30k_methods 5 39 5 39 50 484 50 470
cfunc_itself 5 341 5 331 50 1046 50 1135
fib 5 126 5 127 50 900 50 962
getivar 5 208 5 219 50 2270 50 2630
keyword_args 5 105 5 105 50 959 50 1231
object-new 5 319 5 313 50 403 50 377
respond_to 5 133 5 137 50 3255 50 4030
ruby-xor 5 244 5 242 50 803 50 1388
setivar 5 358 5 356 50 3121 50 5708
setivar_object 5 373 5 339 50 780 50 844
setivar_young 5 374 5 345 50 767 50 847
str_concat 5 402 5 393 50 961 50 1213
throw 5 1261 5 1265 50 1732 50 1639

Different Ruby configurations want different amounts of warmup. With no JIT, CRuby needs hardly any. YJIT and MJIT 3.0 both warm up quite quickly, while MJIT in 3.1 often slows down for a time as it compiles, after an unpredictable delay.

Benchmark YJIT Stats

Hover your cursor over the benchmark names for descriptions of each benchmark.

bench Exit Report Inline Outlined Comp iSeqs Comp Blocks Inval Inval Ratio Bind Alloc Bind Set Const Bumps Compile Time MS
activerecord (click) 1457410 1209622 211 2342 0 0% 0 0 67.811091
chunky-png (click) 316965 257235 85 1207 1 0% 0 0 36.11732
erubi-rails (click) 1967480 1752313 260 3055 19 0% 0 0 83.256837
hexapdf (click) 1509102 1282717 596 13965 41 0% 0 0 398.941122
liquid-c (click) 494962 408911 115 1832 5 0% 0 0 50.747779
liquid-compile (click) 433156 384335 147 2189 2 0% 0 0 66.006983
liquid-render (click) 611284 524420 132 2454 12 0% 0 0 69.094413
lobsters (click) 8410249 7121561 3212 54859 188 0% 0 0 1867.47325
mail (click) 770109 682247 343 5567 16 0% 0 0 161.023936
psych-load (click) 286632 243824 62 647 3 0% 0 0 19.943288
railsbench (click) 3387334 2906410 1642 17043 52 0% 0 0 490.10171
rubocop (click) 5872388 4941158 2888 52407 110 0% 4 0 1551.312225
ruby-lsp (click) 854474 775448 306 4986 26 0% 0 0 142.069728
sequel (click) 465094 372354 12 112 0 0% 0 0 4.198481
binarytrees (click) 8966 7987 7 70 0 0% 0 0 2.78325
blurhash (click) 56475 49154 28 496 0 0% 0 0 15.859466
erubi (click) 229581 201308 6 104 0 0% 0 0 3.389358
etanni (click) 28075 26977 9 93 0 0% 0 0 3.147186
fannkuchredux (click) 23377 30267 4 252 0 0% 0 0 7.437489
fluentd (click) 366191 313287 8 100 0 0% 0 0 3.375876
graphql (click) 438209 345715 67 686 0 0% 0 0 21.253028
graphql-native (click) 404560 348919 38 261 0 0% 0 0 8.861477
lee (click) 280726 231438 46 830 0 0% 0 0 25.805212
loops-times (click) 7563 8052 6 78 0 0% 0 0 2.478813
matmul (click) 11177 4004 9 114 0 0% 0 0 3.745417
nbody (click) 14223 18766 7 191 0 0% 0 0 4.917147
nqueens (click) 20494 27605 6 242 0 0% 0 0 7.059077
optcarrot (click) 327283 311761 189 4544 34 0% 0 0 104.321517
protoboeuf (click) 162731 154477 13 1605 0 0% 0 0 45.666821
protoboeuf-encode (click) 233923 230061 15 1244 0 0% 0 0 32.115576
rack (click) 233231 192701 33 403 0 0% 0 0 10.468038
ruby-json (click) 20509 17904 9 181 0 0% 0 0 5.175832
rubykon (click) 142766 131255 138 1589 3 0% 0 0 45.552006
sudoku (click) 47391 34904 8 533 0 0% 0 0 16.072736
tinygql (click) 267454 221353 59 778 5 0% 0 0 22.029238
30k_ifelse (click) 6315004 5791146 9260 56468 0 0% 0 0 1555.394771
30k_methods (click) 2234900 1593140 5779 19354 0 0% 0 0 450.566237
cfunc_itself (click) 5707 4510 5 52 0 0% 0 0 1.55026
fib (click) 3380 3561 4 32 0 0% 0 0 1.267225
getivar (click) 3832 4970 4 54 0 0% 0 0 1.497306
keyword_args (click) 6976 5463 6 55 0 0% 0 0 1.905874
object-new (click) 2264 2350 3 25 0 0% 0 0 0.892833
respond_to (click) 8661 1480 5 90 0 0% 0 0 2.556138
ruby-xor (click) 5662 6266 5 67 0 0% 0 0 2.002325
setivar (click) 2983 3646 4 34 0 0% 0 0 1.129671
setivar_object (click) 3512 3794 4 36 0 0% 0 0 1.267809
setivar_young (click) 4222 4516 5 44 0 0% 0 0 1.463528
str_concat (click) 6441 6849 7 71 0 0% 0 0 2.290461
throw (click) 6179 4548 6 49 0 0% 0 0 1.698055

YJIT stats correspond to the YJIT stats exit report.

Note: currently, all stats are collected on x86_64, not ARM.

Raw JSON data files

All graphs and table data in this page comes from processing these data files, which come from benchmark runs.