YJIT Benchmarks

Details for Benchmarks at 2025-05-06 03:49:52 UTC

YJIT metrics from the yjit-bench suite using Ruby cbf9c088f8.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 87.0% faster than CRuby 3.5.0dev
  • 6.1% faster than YJIT 3.3.6
On railsbench it is
  • 99.2% faster than CRuby 3.5.0dev
  • 6.6% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 19 minutes
aarch64 runtime: 3 hours, 39 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 83 5 86 50 157 50 173
chunky-png 5 31 5 33 50 15 50 25
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 434 50 589 50 544
liquid-compile 5 411 5 465 50 541 50 693
liquid-render 5 171 5 173 50 407 50 430
lobsters 5 19 5 20 50 10 50 10
mail 5 196 5 180 50 251 50 210
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 252 50 275
ruby-lsp 5 154 5 164 50 260 50 274
sequel 5 432 5 421 50 569 50 599
binarytrees 5 84 5 82 50 149 50 139
blurhash 5 82 5 88 50 127 50 145
erubi 5 116 5 145 50 100 50 148
etanni 5 90 5 102 50 55 50 71
fannkuchredux 5 52 5 57 50 99 50 113
fluentd 5 63 5 63 50 26 50 31
graphql 5 85 5 87 50 57 50 59
graphql-native 5 49 5 58 50 10 50 21
lee 5 22 5 26 50 10 50 10
matmul 5 50 5 51 50 85 50 97
nbody 5 248 5 253 50 576 50 675
nqueens 5 120 5 129 50 75 50 560
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 187 50 621 50 737
protoboeuf-encode 5 180 5 191 50 328 50 848
rack 5 596 5 634 50 947 50 1070
ruby-json 5 84 5 84 50 50 50 50
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 23 50 10 50 10
sudoku 5 48 5 51 50 162 50 173
tinygql 5 35 5 40 50 23 50 33
30k_ifelse 5 28 5 28 50 216 50 208
30k_methods 5 39 5 38 50 482 50 472
cfunc_itself 5 346 5 370 50 1147 50 1258
fib 5 127 5 128 50 910 50 933
getivar 5 207 5 296 50 2242 50 2733
keyword_args 5 107 5 109 50 1042 50 1244
loops-times 5 24 5 27 50 48 50 65
object-new 5 322 5 364 50 403 50 662
respond_to 5 134 5 141 50 3258 50 3987
ruby-xor 5 240 5 259 50 801 50 1377
setivar 5 358 5 600 50 3184 50 5908
setivar_object 5 354 5 466 50 667 50 791
setivar_young 5 365 5 466 50 685 50 793
str_concat 5 398 5 494 50 960 50 1161
throw 5 1261 5 1268 50 1743 50 1715

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) 1451745 1236178 206 2230 0 0% 0 0 63.904874
chunky-png (click) 320849 281803 74 1073 1 0% 0 0 31.635967
erubi-rails (click) 1927247 1625706 262 3123 21 0% 0 0 85.156868
hexapdf (click) 1455384 1262214 595 13340 40 0% 0 0 376.883774
liquid-c (click) 513390 467335 114 1759 5 0% 0 0 49.176143
liquid-compile (click) 441395 368977 146 2190 2 0% 0 0 67.753942
liquid-render (click) 590906 515177 131 2326 8 0% 0 0 66.042834
lobsters (click) 8312985 6986133 3170 54591 112 0% 0 0 1827.733016
mail (click) 769260 711003 342 5636 40 0% 0 0 161.629341
psych-load (click) 249738 211947 61 646 3 0% 0 0 19.329428
railsbench (click) 3274998 2779424 1653 16802 54 0% 0 0 474.77317
rubocop (click) 5713187 4858187 2885 51149 113 0% 4 0 1477.232769
ruby-lsp (click) 818168 713739 305 4837 24 0% 0 0 132.140795
sequel (click) 481502 405172 11 94 0 0% 0 0 3.616994
binarytrees (click) 7093 6143 6 52 0 0% 0 0 2.235386
blurhash (click) 50446 50805 27 444 0 0% 0 0 14.123872
erubi (click) 261563 220998 5 99 0 0% 0 0 3.218625
etanni (click) 30101 29597 8 88 0 0% 0 0 2.957655
fannkuchredux (click) 23031 13626 3 249 0 0% 0 0 7.288379
fluentd (click) 378861 295871 7 93 0 0% 0 0 3.13512
graphql (click) 435454 396977 66 705 0 0% 0 0 20.315317
graphql-native (click) 373377 335572 37 293 0 0% 0 0 8.893666
lee (click) 308824 252707 45 799 0 0% 0 0 24.176843
matmul (click) 10810 11796 8 111 0 0% 0 0 3.613577
nbody (click) 13050 17086 6 172 0 0% 0 0 4.395183
nqueens (click) 20756 19597 5 247 0 0% 0 0 6.979431
optcarrot (click) 318856 234467 188 4395 34 0% 0 0 101.418705
protoboeuf (click) 150678 129601 12 1479 0 0% 0 0 41.701525
protoboeuf-encode (click) 221062 212146 14 1220 0 0% 0 0 31.12902
rack (click) 235539 201229 31 384 0 0% 0 0 10.00042
ruby-json (click) 20167 17506 8 181 0 0% 0 0 4.991866
rubyboy (click) 669766 608751 177 5888 40 0% 0 0 143.654087
rubykon (click) 135591 113219 137 1515 3 0% 0 0 42.693541
sudoku (click) 46753 50636 7 535 0 0% 0 0 15.735629
tinygql (click) 280157 234916 58 824 5 0% 0 0 22.324861
30k_ifelse (click) 5658774 5284843 9259 51667 0 0% 0 0 1427.784732
30k_methods (click) 2234569 1592883 5778 19351 0 0% 0 0 452.191042
cfunc_itself (click) 5130 4086 4 47 0 0% 0 0 1.340798
fib (click) 2599 2861 3 26 0 0% 0 0 0.974903
getivar (click) 3501 4713 3 51 0 0% 0 0 1.357426
keyword_args (click) 6320 4813 5 49 0 0% 0 0 1.599392
loops-times (click) 6843 7499 5 72 0 0% 0 0 2.309438
object-new (click) 2301 2493 2 29 0 0% 0 0 0.935605
respond_to (click) 6409 6687 4 71 0 0% 0 0 1.870113
ruby-xor (click) 5331 6009 4 64 0 0% 0 0 1.888251
setivar (click) 2652 3389 3 31 0 0% 0 0 0.987712
setivar_object (click) 3181 3537 3 33 0 0% 0 0 1.129732
setivar_young (click) 4031 4260 4 44 0 0% 0 0 1.339373
str_concat (click) 5622 6117 6 64 0 0% 0 0 2.076669
throw (click) 5848 4291 5 46 0 0% 0 0 1.60075

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.