YJIT Benchmarks

Details for Benchmarks at 2025-03-31 03:48:37 UTC

YJIT metrics from the yjit-bench suite using Ruby 372515f33c.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 87.7% faster than CRuby 3.5.0dev
  • 5.8% faster than YJIT 3.3.6
On railsbench it is
  • 103.6% faster than CRuby 3.5.0dev
  • 5.9% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 20 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 85 50 157 50 164
chunky-png 5 32 5 34 50 15 50 33
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 411 5 428 50 588 50 635
liquid-compile 5 410 5 426 50 553 50 567
liquid-render 5 172 5 170 50 401 50 444
lobsters 5 19 5 19 50 10 50 10
mail 5 190 5 196 50 251 50 251
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 157 50 252 50 267
ruby-lsp 5 162 5 160 50 259 50 260
sequel 5 433 5 430 50 569 50 571
binarytrees 5 84 5 86 50 149 50 143
blurhash 5 82 5 88 50 127 50 106
erubi 5 119 5 143 50 87 50 147
etanni 5 90 5 102 50 53 50 73
fannkuchredux 5 52 5 58 50 99 50 106
fluentd 5 64 5 64 50 26 50 29
graphql 5 85 5 85 50 57 50 60
graphql-native 5 40 5 53 50 10 50 15
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 54 50 85 50 97
nbody 5 249 5 281 50 577 50 708
nqueens 5 120 5 130 50 75 50 566
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 181 50 620 50 727
protoboeuf-encode 5 179 5 209 50 328 50 806
rack 5 578 5 640 50 942 50 1053
ruby-json 5 83 5 83 50 50 50 49
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 20 5 22 50 10 50 10
sudoku 5 48 5 51 50 164 50 159
tinygql 5 35 5 38 50 22 50 28
30k_ifelse 5 28 5 27 50 215 50 206
30k_methods 5 38 5 38 50 480 50 477
cfunc_itself 5 347 5 368 50 1147 50 1258
fib 5 127 5 148 50 910 50 933
getivar 5 207 5 345 50 2242 50 2767
keyword_args 5 107 5 111 50 1042 50 1243
loops-times 5 24 5 27 50 48 50 65
object-new 5 322 5 327 50 404 50 383
respond_to 5 134 5 141 50 3258 50 3984
ruby-xor 5 240 5 265 50 803 50 1383
setivar 5 357 5 543 50 3176 50 5881
setivar_object 5 355 5 467 50 701 50 809
setivar_young 5 365 5 467 50 743 50 813
str_concat 5 401 5 476 50 968 50 1226
throw 5 1265 5 1251 50 1777 50 1746

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) 1428305 1185318 209 2202 0 0% 0 0 64.064001
chunky-png (click) 295969 244820 84 1129 1 0% 0 0 33.690402
erubi-rails (click) 1909708 1658698 259 2959 19 0% 0 0 86.945689
hexapdf (click) 1428132 1172608 595 13139 36 0% 0 0 377.182045
liquid-c (click) 504958 422266 115 1744 5 0% 0 0 49.013259
liquid-compile (click) 401522 360646 146 2083 2 0% 0 0 65.827676
liquid-render (click) 575679 473238 132 2310 8 0% 0 0 65.531451
lobsters (click) 8135122 6794317 3160 52666 104 0% 0 0 1809.589043
mail (click) 733301 622485 342 5317 14 0% 0 0 155.864147
psych-load (click) 277390 252613 61 615 3 0% 0 0 19.434721
railsbench (click) 3261295 2740601 1645 16205 52 0% 0 0 469.361634
rubocop (click) 5667997 4881245 2887 50559 110 0% 4 0 1496.348869
ruby-lsp (click) 846659 774787 305 4732 24 0% 0 0 134.972308
sequel (click) 475938 408804 11 94 0 0% 0 0 3.266657
binarytrees (click) 7093 6143 6 52 0 0% 0 0 2.311971
blurhash (click) 50118 50863 27 438 0 0% 0 0 14.199495
erubi (click) 228454 209293 5 97 0 0% 0 0 3.203175
etanni (click) 30101 29597 8 88 0 0% 0 0 3.01479
fannkuchredux (click) 23031 13626 3 249 0 0% 0 0 7.367096
fluentd (click) 372209 314269 7 93 0 0% 0 0 3.215508
graphql (click) 429220 368954 66 676 0 0% 0 0 21.224337
graphql-native (click) 364616 320036 37 255 0 0% 0 0 8.518268
lee (click) 263014 216111 45 749 0 0% 0 0 23.588793
matmul (click) 10657 3512 8 109 0 0% 0 0 3.571505
nbody (click) 13050 17086 6 172 0 0% 0 0 4.461202
nqueens (click) 20163 27348 5 239 0 0% 0 0 6.944896
optcarrot (click) 318856 234467 188 4395 34 0% 0 0 102.121193
protoboeuf (click) 150678 129601 12 1479 0 0% 0 0 42.379829
protoboeuf-encode (click) 221062 212146 14 1220 0 0% 0 0 31.535508
rack (click) 235407 208181 32 385 0 0% 0 0 10.017449
ruby-json (click) 23776 20731 8 178 0 0% 0 0 5.193353
rubyboy (click) 686539 642917 177 5803 40 0% 0 0 144.553699
rubykon (click) 133501 111856 137 1482 3 0% 0 0 43.055615
sudoku (click) 45311 40871 7 516 0 0% 0 0 15.67669
tinygql (click) 269544 244935 58 762 5 0% 0 0 21.875868
30k_ifelse (click) 5658774 5284843 9259 51667 0 0% 0 0 1429.671442
30k_methods (click) 2234569 1592883 5778 19351 0 0% 0 0 455.702351
cfunc_itself (click) 5130 4086 4 47 0 0% 0 0 1.374764
fib (click) 2599 2861 3 26 0 0% 0 0 0.985
getivar (click) 3501 4713 3 51 0 0% 0 0 1.349903
keyword_args (click) 6320 4813 5 49 0 0% 0 0 1.628211
loops-times (click) 6688 7405 5 70 0 0% 0 0 2.294195
object-new (click) 1918 2093 2 22 0 0% 0 0 0.845273
respond_to (click) 5868 6227 4 62 0 0% 0 0 1.747656
ruby-xor (click) 5331 6009 4 64 0 0% 0 0 1.902649
setivar (click) 2652 3389 3 31 0 0% 0 0 0.960399
setivar_object (click) 3181 3537 3 33 0 0% 0 0 1.12387
setivar_young (click) 3891 4259 4 41 0 0% 0 0 1.364482
str_concat (click) 5469 6016 6 62 0 0% 0 0 2.093217
throw (click) 5848 4291 5 46 0 0% 0 0 1.61624

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.