YJIT Benchmarks

Details for Benchmarks at 2025-04-28 03:50:54 UTC

YJIT metrics from the yjit-bench suite using Ruby 3ec7bfff2e.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 87.2% faster than CRuby 3.5.0dev
  • 7.7% faster than YJIT 3.3.6
On railsbench it is
  • 101.1% faster than CRuby 3.5.0dev
  • 5.2% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 10 minutes
aarch64 runtime: 3 hours, 33 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 87 50 155 50 172
chunky-png 5 31 5 33 50 15 50 24
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 433 50 592 50 572
liquid-compile 5 409 5 462 50 536 50 696
liquid-render 5 170 5 169 50 404 50 441
mail 5 189 5 176 50 251 50 222
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 160 50 250 50 276
ruby-lsp 5 161 5 163 50 248 50 277
sequel 5 430 5 425 50 596 50 589
binarytrees 5 84 5 81 50 148 50 135
blurhash 5 82 5 88 50 127 50 145
erubi 5 85 5 137 50 98 50 130
etanni 5 91 5 102 50 55 50 69
fannkuchredux 5 49 5 58 50 99 50 108
fluentd 5 63 5 63 50 26 50 31
graphql 5 85 5 84 50 57 50 60
graphql-native 5 40 5 54 50 10 50 19
lee 5 23 5 25 50 10 50 10
matmul 5 51 5 61 50 85 50 97
nbody 5 248 5 324 50 575 50 634
nqueens 5 120 5 124 50 75 50 561
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 187 50 620 50 743
protoboeuf-encode 5 180 5 206 50 328 50 828
rack 5 590 5 630 50 951 50 1059
ruby-json 5 83 5 83 50 50 50 47
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 23 50 10 50 10
sudoku 5 48 5 51 50 160 50 162
tinygql 5 36 5 39 50 22 50 33
30k_ifelse 5 28 5 28 50 216 50 206
30k_methods 5 38 5 38 50 479 50 474
cfunc_itself 5 346 5 355 50 1147 50 1258
fib 5 127 5 120 50 910 50 933
getivar 5 207 5 325 50 2243 50 2761
keyword_args 5 106 5 110 50 1042 50 1243
loops-times 5 24 5 27 50 48 50 65
object-new 5 322 5 361 50 404 50 652
respond_to 5 132 5 140 50 3257 50 3989
ruby-xor 5 240 5 256 50 801 50 1382
setivar 5 358 5 651 50 3193 50 5934
setivar_object 5 355 5 481 50 665 50 809
setivar_young 5 365 5 481 50 684 50 804
str_concat 5 397 5 445 50 961 50 1162
throw 5 1259 5 1234 50 1744 50 1644

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) 1477658 1273256 206 2230 0 0% 0 0 63.156906
chunky-png (click) 300906 246864 74 1078 1 0% 0 0 31.747167
hexapdf (click) 1456331 1246880 595 13351 40 0% 0 0 375.306179
liquid-c (click) 516231 420312 114 1758 5 0% 0 0 48.82074
liquid-compile (click) 415624 370320 146 2192 2 0% 0 0 67.468812
liquid-render (click) 590837 529237 131 2325 8 0% 0 0 65.249693
mail (click) 771939 646821 342 5636 40 0% 0 0 163.929573
psych-load (click) 258299 241665 61 645 3 0% 0 0 19.739284
railsbench (click) 3294378 2892495 1653 16743 54 0% 0 0 476.852833
rubocop (click) 5707147 4950177 2885 51130 113 0% 4 0 1472.968453
ruby-lsp (click) 823491 734340 305 4836 24 0% 0 0 135.194905
sequel (click) 452204 379466 11 94 0 0% 0 0 3.267161
binarytrees (click) 7093 6143 6 52 0 0% 0 0 2.267487
blurhash (click) 50446 50805 27 444 0 0% 0 0 14.118155
erubi (click) 235357 181463 5 99 0 0% 0 0 3.258978
etanni (click) 30101 29597 8 88 0 0% 0 0 2.943928
fannkuchredux (click) 23031 13626 3 249 0 0% 0 0 7.297518
fluentd (click) 381892 298993 7 93 0 0% 0 0 3.228781
graphql (click) 409846 349308 66 705 0 0% 0 0 21.733797
graphql-native (click) 399387 350653 37 293 0 0% 0 0 8.603209
lee (click) 282949 238136 45 799 0 0% 0 0 24.293115
matmul (click) 10810 11796 8 111 0 0% 0 0 3.615997
nbody (click) 13050 17086 6 172 0 0% 0 0 4.403849
nqueens (click) 20756 19597 5 247 0 0% 0 0 6.951873
optcarrot (click) 318856 234467 188 4395 34 0% 0 0 100.937077
protoboeuf (click) 150678 129601 12 1479 0 0% 0 0 42.056388
protoboeuf-encode (click) 221062 212146 14 1220 0 0% 0 0 31.210709
rack (click) 243733 213749 31 383 0 0% 0 0 10.185109
ruby-json (click) 20167 17506 8 181 0 0% 0 0 5.02329
rubyboy (click) 697071 648868 177 5886 40 0% 0 0 143.875695
rubykon (click) 135193 121132 137 1513 3 0% 0 0 42.80457
sudoku (click) 46753 50636 7 535 0 0% 0 0 15.834888
tinygql (click) 281446 227625 58 824 5 0% 0 0 22.472118
30k_ifelse (click) 5658774 5284843 9259 51667 0 0% 0 0 1435.457756
30k_methods (click) 2234569 1592883 5778 19351 0 0% 0 0 453.795835
cfunc_itself (click) 5130 4086 4 47 0 0% 0 0 1.339321
fib (click) 2599 2861 3 26 0 0% 0 0 0.982696
getivar (click) 3501 4713 3 51 0 0% 0 0 1.34235
keyword_args (click) 6320 4813 5 49 0 0% 0 0 1.593401
loops-times (click) 6843 7499 5 72 0 0% 0 0 2.334364
object-new (click) 2301 2493 2 29 0 0% 0 0 0.89346
respond_to (click) 6409 6687 4 71 0 0% 0 0 1.871291
ruby-xor (click) 5331 6009 4 64 0 0% 0 0 1.911452
setivar (click) 2652 3389 3 31 0 0% 0 0 1.032741
setivar_object (click) 3181 3537 3 33 0 0% 0 0 1.117649
setivar_young (click) 4031 4260 4 44 0 0% 0 0 1.342777
str_concat (click) 5622 6117 6 64 0 0% 0 0 2.00075
throw (click) 5848 4291 5 46 0 0% 0 0 1.611807

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.