YJIT Benchmarks

Details for Benchmarks at 2025-05-03 03:48:43 UTC

YJIT metrics from the yjit-bench suite using Ruby 36c64b3be8.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 89.2% faster than CRuby 3.5.0dev
  • 7.0% faster than YJIT 3.3.6
On railsbench it is
  • 98.0% faster than CRuby 3.5.0dev
  • 6.2% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 19 minutes
aarch64 runtime: 3 hours, 42 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 158 50 177
chunky-png 5 31 5 33 50 14 50 24
erubi-rails 5 16 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 419 5 434 50 591 50 651
liquid-compile 5 411 5 468 50 543 50 682
liquid-render 5 171 5 167 50 404 50 394
lobsters 5 20 5 20 50 10 50 10
mail 5 196 5 176 50 236 50 215
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 157 5 160 50 251 50 275
ruby-lsp 5 155 5 164 50 260 50 272
sequel 5 431 5 420 50 574 50 601
binarytrees 5 84 5 83 50 148 50 141
blurhash 5 82 5 86 50 127 50 145
erubi 5 125 5 145 50 99 50 129
etanni 5 90 5 100 50 55 50 69
fannkuchredux 5 52 5 58 50 99 50 112
fluentd 5 63 5 63 50 25 50 32
graphql 5 85 5 86 50 57 50 59
graphql-native 5 40 5 56 50 10 50 19
lee 5 23 5 27 50 10 50 10
matmul 5 51 5 51 50 85 50 99
nbody 5 248 5 242 50 576 50 655
nqueens 5 120 5 128 50 75 50 560
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 190 50 620 50 736
protoboeuf-encode 5 180 5 215 50 328 50 822
rack 5 591 5 643 50 962 50 1098
ruby-json 5 84 5 83 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 171
tinygql 5 36 5 39 50 23 50 34
30k_ifelse 5 28 5 28 50 215 50 207
30k_methods 5 39 5 38 50 481 50 472
cfunc_itself 5 346 5 369 50 1147 50 1258
fib 5 127 5 148 50 910 50 933
getivar 5 207 5 311 50 2244 50 2744
keyword_args 5 107 5 110 50 1042 50 1243
loops-times 5 24 5 27 50 48 50 65
object-new 5 323 5 364 50 405 50 666
respond_to 5 133 5 140 50 3258 50 3990
ruby-xor 5 241 5 264 50 801 50 1374
setivar 5 358 5 579 50 3196 50 5898
setivar_object 5 355 5 435 50 665 50 784
setivar_young 5 365 5 435 50 685 50 791
str_concat 5 400 5 454 50 960 50 1176
throw 5 1263 5 1275 50 1738 50 1708

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) 1475582 1247720 206 2230 0 0% 0 0 63.946694
chunky-png (click) 297567 260529 74 1073 1 0% 0 0 31.69738
erubi-rails (click) 1914148 1573998 263 3102 21 0% 0 0 86.449502
hexapdf (click) 1458411 1208070 596 13344 40 0% 0 0 379.165766
liquid-c (click) 514534 419172 114 1758 5 0% 0 0 49.617341
liquid-compile (click) 438935 334778 146 2195 2 0% 0 0 68.407247
liquid-render (click) 593729 507992 131 2325 8 0% 0 0 65.647428
lobsters (click) 8305710 7032567 3170 54493 112 0% 0 0 1847.481811
mail (click) 764685 673429 342 5637 40 0% 0 0 167.446448
psych-load (click) 280985 246147 61 645 3 0% 0 0 19.773363
railsbench (click) 3267258 2764096 1653 16761 54 0% 0 0 479.075056
rubocop (click) 5733547 4809430 2885 51144 113 0% 4 0 1489.542143
ruby-lsp (click) 822978 751052 305 4836 24 0% 0 0 135.964213
sequel (click) 455104 404779 11 94 0 0% 0 0 3.215383
binarytrees (click) 7093 6143 6 52 0 0% 0 0 2.238757
blurhash (click) 50446 50805 27 444 0 0% 0 0 14.150163
erubi (click) 236601 223520 5 99 0 0% 0 0 3.262461
etanni (click) 30101 29597 8 88 0 0% 0 0 3.033557
fannkuchredux (click) 23031 13626 3 249 0 0% 0 0 7.381804
fluentd (click) 378450 303927 7 93 0 0% 0 0 3.175556
graphql (click) 418112 367568 66 705 0 0% 0 0 20.478663
graphql-native (click) 376326 330503 37 293 0 0% 0 0 8.433338
lee (click) 291482 231584 45 799 0 0% 0 0 24.435014
matmul (click) 10810 11796 8 111 0 0% 0 0 3.619822
nbody (click) 13050 17086 6 172 0 0% 0 0 4.447884
nqueens (click) 20756 19597 5 247 0 0% 0 0 7.052486
optcarrot (click) 318856 234467 188 4395 34 0% 0 0 102.799462
protoboeuf (click) 150678 129601 12 1479 0 0% 0 0 42.263952
protoboeuf-encode (click) 221062 212146 14 1220 0 0% 0 0 31.325784
rack (click) 268930 220231 31 383 0 0% 0 0 10.275509
ruby-json (click) 20619 18110 8 181 0 0% 0 0 5.112816
rubyboy (click) 667862 599980 177 5888 40 0% 0 0 145.879358
rubykon (click) 135591 113219 137 1515 3 0% 0 0 43.272981
sudoku (click) 46753 50636 7 535 0 0% 0 0 15.928848
tinygql (click) 278798 210340 58 824 5 0% 0 0 22.578645
30k_ifelse (click) 5658774 5284843 9259 51667 0 0% 0 0 1447.204559
30k_methods (click) 2234569 1592883 5778 19351 0 0% 0 0 458.451905
cfunc_itself (click) 5130 4086 4 47 0 0% 0 0 1.338869
fib (click) 2599 2861 3 26 0 0% 0 0 1.023981
getivar (click) 3501 4713 3 51 0 0% 0 0 1.368908
keyword_args (click) 6320 4813 5 49 0 0% 0 0 1.595014
loops-times (click) 6843 7499 5 72 0 0% 0 0 2.3224
object-new (click) 2301 2493 2 29 0 0% 0 0 0.954473
respond_to (click) 6409 6687 4 71 0 0% 0 0 1.871647
ruby-xor (click) 5331 6009 4 64 0 0% 0 0 1.883369
setivar (click) 2652 3389 3 31 0 0% 0 0 1.032077
setivar_object (click) 3181 3537 3 33 0 0% 0 0 1.106412
setivar_young (click) 4031 4260 4 44 0 0% 0 0 1.383525
str_concat (click) 5622 6117 6 64 0 0% 0 0 2.097001
throw (click) 5848 4291 5 46 0 0% 0 0 1.590436

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.