YJIT Benchmarks

Details for Benchmarks at 2025-03-07 03:46:28 UTC

YJIT metrics from the yjit-bench suite using Ruby 6bad47ac6d.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 88.1% faster than CRuby 3.5.0dev
  • 6.4% faster than YJIT 3.3.6
On railsbench it is
  • 103.7% faster than CRuby 3.5.0dev
  • 7.8% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 19 minutes
aarch64 runtime: 3 hours, 40 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.5.0dev warmups CRuby 3.5.0dev iters YJIT 3.3.6 warmups YJIT 3.3.6 iters YJIT 3.5.0dev warmups YJIT 3.5.0dev iters
activerecord 5 82 5 84 50 157 50 167
chunky-png 5 31 5 35 50 15 50 33
erubi-rails 5 16 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 428 50 592 50 627
liquid-compile 5 408 5 419 50 538 50 563
liquid-render 5 172 5 175 50 404 50 437
lobsters 5 20 5 19 50 10 50 10
mail 5 195 5 197 50 242 50 255
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 157 5 161 50 254 50 268
ruby-lsp 5 162 5 158 50 261 50 271
sequel 5 420 5 425 50 601 50 572
binarytrees 5 84 5 86 50 149 50 142
blurhash 5 82 5 88 50 127 50 145
erubi 5 117 5 150 50 87 50 148
etanni 5 91 5 102 50 54 50 72
fannkuchredux 5 52 5 57 50 96 50 109
fluentd 5 63 5 74 50 25 50 31
graphql 5 85 5 84 50 56 50 59
graphql-native 5 48 5 53 50 10 50 15
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 54 50 85 50 97
nbody 5 248 5 288 50 578 50 705
nqueens 5 120 5 128 50 75 50 564
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 190 50 620 50 732
protoboeuf-encode 5 180 5 212 50 329 50 825
rack 5 570 5 623 50 946 50 1074
ruby-json 5 84 5 85 50 50 50 50
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 50 50 164 50 161
tinygql 5 36 5 39 50 22 50 30
30k_ifelse 5 28 5 28 50 216 50 207
30k_methods 5 38 5 38 50 484 50 471
cfunc_itself 5 346 5 362 50 1147 50 1258
fib 5 127 5 151 50 909 50 933
getivar 5 207 5 326 50 2237 50 2770
keyword_args 5 107 5 109 50 1042 50 1244
loops-times 5 24 5 27 50 48 50 65
object-new 5 323 5 328 50 405 50 387
respond_to 5 134 5 138 50 3258 50 3985
ruby-xor 5 240 5 256 50 803 50 1382
setivar 5 358 5 653 50 3192 50 5938
setivar_object 5 354 5 481 50 703 50 819
setivar_young 5 365 5 480 50 756 50 815
str_concat 5 398 5 463 50 969 50 1208
throw 5 1263 5 1284 50 1775 50 1729

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) 1448708 1275059 209 2204 0 0% 0 0 64.27683
chunky-png (click) 301982 266480 84 1124 1 0% 0 0 33.306862
erubi-rails (click) 1910350 1600353 259 2963 19 0% 0 0 83.148756
hexapdf (click) 1444385 1191998 595 13143 42 0% 0 0 376.581897
liquid-c (click) 478350 405787 114 1743 5 0% 0 0 49.309552
liquid-compile (click) 402346 343776 146 2087 2 0% 0 0 65.187206
liquid-render (click) 579354 513329 131 2309 8 0% 0 0 65.247887
lobsters (click) 8128963 6925992 3158 52678 104 0% 0 0 1811.378226
mail (click) 726581 674779 342 5318 14 0% 0 0 154.333385
psych-load (click) 242941 223111 61 617 3 0% 0 0 19.214598
railsbench (click) 3234993 2706250 1645 16242 52 0% 0 0 469.141568
rubocop (click) 5688218 4987142 2887 50558 110 0% 4 0 1465.699386
ruby-lsp (click) 817598 713906 305 4729 24 0% 0 0 133.510035
sequel (click) 456787 383107 11 94 0 0% 0 0 3.1935
binarytrees (click) 7093 6143 6 52 0 0% 0 0 2.196237
blurhash (click) 50118 50863 27 438 0 0% 0 0 14.193752
erubi (click) 231413 194748 5 97 0 0% 0 0 3.214421
etanni (click) 27173 26329 8 88 0 0% 0 0 2.985879
fannkuchredux (click) 23046 13626 3 249 0 0% 0 0 7.336912
fluentd (click) 356722 300590 7 93 0 0% 0 0 3.234079
graphql (click) 403383 361927 66 676 0 0% 0 0 21.089342
graphql-native (click) 367536 322346 37 255 0 0% 0 0 8.6274
lee (click) 263403 231536 45 750 0 0% 0 0 23.239179
matmul (click) 10657 3512 8 109 0 0% 0 0 3.517451
nbody (click) 13065 17086 6 172 0 0% 0 0 4.388359
nqueens (click) 20163 27348 5 239 0 0% 0 0 6.873225
optcarrot (click) 319096 242804 188 4399 34 0% 0 0 101.986339
protoboeuf (click) 150678 129601 12 1479 0 0% 0 0 41.998478
protoboeuf-encode (click) 221107 212146 14 1220 0 0% 0 0 31.165665
rack (click) 234587 214723 32 385 0 0% 0 0 10.360329
ruby-json (click) 20126 17605 9 184 0 0% 0 0 5.221942
rubyboy (click) 682779 622267 177 5803 40 0% 0 0 143.809483
rubykon (click) 134065 128972 137 1489 3 0% 0 0 42.468508
sudoku (click) 45311 40871 7 516 0 0% 0 0 15.407286
tinygql (click) 259247 204577 58 762 5 0% 0 0 21.829812
30k_ifelse (click) 5658804 5284852 9259 51668 0 0% 0 0 1402.332421
30k_methods (click) 2234569 1592883 5778 19351 0 0% 0 0 449.4123
cfunc_itself (click) 5130 4086 4 47 0 0% 0 0 1.334947
fib (click) 2599 2861 3 26 0 0% 0 0 0.985305
getivar (click) 3501 4713 3 51 0 0% 0 0 1.317927
keyword_args (click) 6320 4813 5 49 0 0% 0 0 1.662386
loops-times (click) 6703 7405 5 71 0 0% 0 0 2.284582
object-new (click) 1933 2093 2 22 0 0% 0 0 0.831205
respond_to (click) 5868 6227 4 62 0 0% 0 0 1.703808
ruby-xor (click) 5331 6009 4 64 0 0% 0 0 1.906291
setivar (click) 2652 3389 3 31 0 0% 0 0 0.98932
setivar_object (click) 3181 3537 3 33 0 0% 0 0 1.069711
setivar_young (click) 3891 4259 4 41 0 0% 0 0 1.319046
str_concat (click) 5469 6016 6 62 0 0% 0 0 2.036665
throw (click) 5848 4291 5 46 0 0% 0 0 1.602641

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.