YJIT Benchmarks

Details for Benchmarks at 2025-01-01 03:46:55 UTC

YJIT metrics from the yjit-bench suite using Ruby 341503d1a3.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 86.3% faster than CRuby 3.5.0dev
  • 4.0% faster than YJIT 3.3.6
On railsbench it is
  • 89.0% faster than CRuby 3.5.0dev
  • the same speed as YJIT 3.3.6
x86_64 runtime: 3 hours, 51 minutes
aarch64 runtime: 3 hours, 19 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 83 50 154 50 161
chunky-png 5 31 5 32 50 15 50 34
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 426 50 564 50 607
liquid-compile 5 408 5 409 50 540 50 555
liquid-render 5 171 5 171 50 406 50 433
lobsters 5 20 5 20 50 10 50 10
mail 5 188 5 188 50 236 50 240
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 155 50 252 50 265
ruby-lsp 5 158 5 159 50 241 50 205
sequel 5 428 5 415 50 596 50 579
binarytrees 5 84 5 82 50 144 50 139
blurhash 5 82 5 81 50 127 50 145
erubi 5 75 5 141 50 86 50 151
etanni 5 91 5 97 50 54 50 71
fannkuchredux 5 52 5 55 50 101 50 102
fluentd 5 64 5 63 50 26 50 25
graphql 5 84 5 87 50 57 50 60
graphql-native 5 40 5 53 50 10 50 14
lee 5 22 5 23 50 10 50 10
loops-times 5 24 5 23 50 48 50 65
matmul 5 51 5 52 50 85 50 98
nbody 5 248 5 258 50 577 50 703
nqueens 5 120 5 120 50 75 50 565
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 180 5 175 50 620 50 720
protoboeuf-encode 5 177 5 197 50 327 50 828
rack 5 590 5 618 50 957 50 1039
ruby-json 5 84 5 85 50 50 50 51
rubykon 5 20 5 21 50 10 50 10
sudoku 5 48 5 48 50 164 50 160
tinygql 5 35 5 37 50 23 50 28
30k_ifelse 5 28 5 28 50 215 50 206
30k_methods 5 38 5 38 50 483 50 476
cfunc_itself 5 346 5 329 50 1046 50 1145
fib 5 127 5 128 50 907 50 937
getivar 5 207 5 218 50 2256 50 2625
keyword_args 5 107 5 101 50 959 50 1134
object-new 5 321 5 310 50 404 50 380
respond_to 5 133 5 141 50 3261 50 3984
ruby-xor 5 242 5 245 50 803 50 1371
setivar 5 358 5 358 50 3124 50 5717
setivar_object 5 375 5 341 50 748 50 850
setivar_young 5 374 5 344 50 771 50 852
str_concat 5 401 5 392 50 969 50 1183
throw 5 1261 5 1265 50 1734 50 1709

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) 1440902 1225817 210 2207 0 0% 0 0 63.927596
chunky-png (click) 295459 292234 85 1127 1 0% 0 0 33.529732
erubi-rails (click) 1899970 1569933 259 3007 19 0% 0 0 81.784659
hexapdf (click) 1439809 1261715 596 13145 41 0% 0 0 381.647124
liquid-c (click) 475507 428587 115 1750 5 0% 0 0 48.66694
liquid-compile (click) 403697 346840 147 2090 2 0% 0 0 65.83134
liquid-render (click) 581953 554521 132 2315 8 0% 0 0 65.377369
lobsters (click) 8131814 6843336 3215 52622 172 0% 0 0 1808.556043
mail (click) 733030 672597 343 5321 14 0% 0 0 153.920647
psych-load (click) 243329 188167 62 620 3 0% 0 0 19.47485
railsbench (click) 3232140 2795707 1642 16185 52 0% 0 0 474.668867
rubocop (click) 5689083 4839996 2888 50557 110 0% 4 0 1511.007534
ruby-lsp (click) 843330 729531 306 4738 24 0% 0 0 134.568903
sequel (click) 455190 397617 12 97 0 0% 0 0 3.707222
binarytrees (click) 7424 6400 7 55 0 0% 0 0 2.377334
blurhash (click) 50449 51120 28 441 0 0% 0 0 14.273632
erubi (click) 248985 193679 6 100 0 0% 0 0 3.346969
etanni (click) 27627 26630 9 91 0 0% 0 0 3.094455
fannkuchredux (click) 23377 30267 4 252 0 0% 0 0 7.46986
fluentd (click) 343437 300794 8 96 0 0% 0 0 3.314045
graphql (click) 423500 355078 67 679 0 0% 0 0 21.185698
graphql-native (click) 357848 306818 38 258 0 0% 0 0 8.742547
lee (click) 270994 228100 46 749 0 0% 0 0 23.385297
loops-times (click) 7034 7662 6 74 0 0% 0 0 2.385078
matmul (click) 10988 3769 9 112 0 0% 0 0 3.709355
nbody (click) 13396 17343 7 175 0 0% 0 0 4.572737
nqueens (click) 20494 27605 6 242 0 0% 0 0 7.043604
optcarrot (click) 319427 243061 189 4402 34 0% 0 0 100.50172
protoboeuf (click) 151228 130005 13 1484 0 0% 0 0 41.970302
protoboeuf-encode (click) 221443 220595 15 1223 0 0% 0 0 31.255375
rack (click) 235732 208471 33 388 0 0% 0 0 10.359528
ruby-json (click) 25320 22486 9 181 0 0% 0 0 5.115785
rubykon (click) 135230 146429 138 1500 3 0% 0 0 42.944972
sudoku (click) 45866 41280 8 521 0 0% 0 0 15.417298
tinygql (click) 263489 224058 59 765 5 0% 0 0 21.683616
30k_ifelse (click) 5659135 5285109 9260 51671 0 0% 0 0 1420.232665
30k_methods (click) 2234900 1593140 5779 19354 0 0% 0 0 453.485524
cfunc_itself (click) 5461 4343 5 50 0 0% 0 0 1.477043
fib (click) 2930 3118 4 29 0 0% 0 0 1.16431
getivar (click) 3832 4970 4 54 0 0% 0 0 1.48989
keyword_args (click) 6651 5070 6 52 0 0% 0 0 1.772972
object-new (click) 2264 2350 3 25 0 0% 0 0 0.919711
respond_to (click) 6199 6484 5 65 0 0% 0 0 1.917077
ruby-xor (click) 5662 6266 5 67 0 0% 0 0 2.002384
setivar (click) 2983 3646 4 34 0 0% 0 0 1.149594
setivar_object (click) 3512 3794 4 36 0 0% 0 0 1.250113
setivar_young (click) 4222 4516 5 44 0 0% 0 0 1.455183
str_concat (click) 5800 6273 7 65 0 0% 0 0 2.125493
throw (click) 6179 4548 6 49 0 0% 0 0 1.726147

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.