YJIT Benchmarks

Details for Benchmarks at 2025-04-16 03:48:47 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 89.5% faster than CRuby 3.5.0dev
  • 8.2% faster than YJIT 3.3.6
On railsbench it is
  • 105.2% faster than CRuby 3.5.0dev
  • 8.3% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 20 minutes
aarch64 runtime: 3 hours, 40 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 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 431 50 589 50 622
liquid-compile 5 408 5 466 50 537 50 685
liquid-render 5 171 5 169 50 404 50 440
lobsters 5 20 5 19 50 10 50 10
mail 5 195 5 197 50 251 50 245
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 157 5 158 50 253 50 266
ruby-lsp 5 155 5 163 50 236 50 269
sequel 5 433 5 423 50 604 50 581
binarytrees 5 84 5 84 50 149 50 135
blurhash 5 78 5 88 50 127 50 145
erubi 5 75 5 142 50 34 50 130
etanni 5 90 5 101 50 54 50 71
fannkuchredux 5 52 5 57 50 99 50 107
fluentd 5 63 5 63 50 25 50 30
graphql 5 85 5 82 50 57 50 59
graphql-native 5 40 5 50 50 10 50 14
lee 5 22 5 25 50 10 50 10
matmul 5 51 5 51 50 85 50 97
nbody 5 248 5 253 50 577 50 647
nqueens 5 120 5 127 50 71 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 185 50 620 50 721
protoboeuf-encode 5 180 5 183 50 328 50 816
rack 5 575 5 638 50 948 50 1055
ruby-json 5 84 5 84 50 50 50 50
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 51 50 164 50 161
tinygql 5 36 5 36 50 22 50 28
30k_ifelse 5 28 5 28 50 214 50 206
30k_methods 5 38 5 38 50 482 50 474
cfunc_itself 5 346 5 353 50 1147 50 1258
fib 5 127 5 150 50 909 50 933
getivar 5 207 5 317 50 2239 50 2749
keyword_args 5 107 5 104 50 1042 50 1243
loops-times 5 24 5 28 50 47 50 65
object-new 5 321 5 327 50 405 50 388
respond_to 5 133 5 143 50 3254 50 3972
ruby-xor 5 224 5 249 50 804 50 1374
setivar 5 358 5 642 50 3191 50 5927
setivar_object 5 355 5 480 50 708 50 793
setivar_young 5 365 5 481 50 743 50 808
str_concat 5 397 5 459 50 968 50 1208
throw 5 1263 5 1290 50 1769 50 1723

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) 1424858 1224463 209 2202 0 0% 0 0 64.885299
chunky-png (click) 295343 252565 84 1124 1 0% 0 0 33.50408
erubi-rails (click) 1910716 1667107 259 2959 19 0% 0 0 80.982401
hexapdf (click) 1434086 1209412 595 13147 39 0% 0 0 385.068876
liquid-c (click) 474677 396462 115 1744 5 0% 0 0 48.069088
liquid-compile (click) 395783 356999 146 2080 2 0% 0 0 64.679057
liquid-render (click) 581366 461218 132 2310 8 0% 0 0 65.934141
lobsters (click) 8132301 6874088 3159 52754 104 0% 0 0 1803.318169
mail (click) 739067 660574 342 5326 14 0% 0 0 154.83028
psych-load (click) 249031 226953 61 617 3 0% 0 0 19.413502
railsbench (click) 3229453 2737742 1645 16235 52 0% 0 0 468.627713
rubocop (click) 5692423 4870243 2887 50535 110 0% 4 0 1580.869831
ruby-lsp (click) 810967 720243 305 4727 24 0% 0 0 134.67022
sequel (click) 444733 376189 11 94 0 0% 0 0 3.456349
binarytrees (click) 7093 6143 6 52 0 0% 0 0 2.365069
blurhash (click) 50118 50863 27 438 0 0% 0 0 14.234129
erubi (click) 223473 206366 5 97 0 0% 0 0 3.256071
etanni (click) 30101 29597 8 88 0 0% 0 0 2.967775
fannkuchredux (click) 23031 13626 3 249 0 0% 0 0 7.396935
fluentd (click) 360866 319656 7 93 0 0% 0 0 3.151503
graphql (click) 392410 370261 66 676 0 0% 0 0 21.522414
graphql-native (click) 363839 329142 37 255 0 0% 0 0 8.582928
lee (click) 274006 233518 45 749 0 0% 0 0 23.640791
matmul (click) 10657 3512 8 109 0 0% 0 0 3.544485
nbody (click) 13050 17086 6 172 0 0% 0 0 4.377907
nqueens (click) 20163 27348 5 239 0 0% 0 0 6.897882
optcarrot (click) 318856 234467 188 4395 34 0% 0 0 103.806824
protoboeuf (click) 150678 129601 12 1479 0 0% 0 0 42.281603
protoboeuf-encode (click) 221062 212146 14 1220 0 0% 0 0 31.650181
rack (click) 230431 213463 32 385 0 0% 0 0 10.237883
ruby-json (click) 20004 17403 8 178 0 0% 0 0 5.057414
rubyboy (click) 660025 604827 177 5803 40 0% 0 0 143.929947
rubykon (click) 133501 111856 137 1482 3 0% 0 0 43.334538
sudoku (click) 45311 40871 7 516 0 0% 0 0 15.610793
tinygql (click) 264089 225263 58 762 5 0% 0 0 21.694592
30k_ifelse (click) 5658774 5284843 9259 51667 0 0% 0 0 1423.661447
30k_methods (click) 2234569 1592883 5778 19351 0 0% 0 0 456.138355
cfunc_itself (click) 5130 4086 4 47 0 0% 0 0 1.341102
fib (click) 2599 2861 3 26 0 0% 0 0 0.97919
getivar (click) 3501 4713 3 51 0 0% 0 0 1.384719
keyword_args (click) 6320 4813 5 49 0 0% 0 0 1.613828
loops-times (click) 6688 7405 5 70 0 0% 0 0 2.278217
object-new (click) 1918 2093 2 22 0 0% 0 0 0.826206
respond_to (click) 5868 6227 4 62 0 0% 0 0 1.763611
ruby-xor (click) 5331 6009 4 64 0 0% 0 0 1.933142
setivar (click) 2652 3389 3 31 0 0% 0 0 0.997066
setivar_object (click) 3181 3537 3 33 0 0% 0 0 1.113611
setivar_young (click) 3891 4259 4 41 0 0% 0 0 1.304825
str_concat (click) 5469 6016 6 62 0 0% 0 0 2.025418
throw (click) 5848 4291 5 46 0 0% 0 0 1.622241

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.