YJIT Benchmarks

Details for Benchmarks at 2025-05-01 03:53:59 UTC

YJIT metrics from the yjit-bench suite using Ruby 994dadfbf4.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 85.6% faster than CRuby 3.5.0dev
  • 5.3% faster than YJIT 3.3.6
On railsbench it is
  • 101.1% faster than CRuby 3.5.0dev
  • 7.1% 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 85 50 158 50 182
chunky-png 5 32 5 33 50 15 50 24
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 436 50 574 50 573
liquid-compile 5 409 5 464 50 538 50 701
liquid-render 5 171 5 173 50 408 50 395
lobsters 5 20 5 20 50 10 50 10
mail 5 193 5 179 50 251 50 204
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 249 50 274
ruby-lsp 5 145 5 161 50 249 50 268
sequel 5 435 5 418 50 602 50 599
binarytrees 5 84 5 82 50 148 50 134
blurhash 5 82 5 86 50 127 50 144
erubi 5 126 5 136 50 98 50 143
etanni 5 90 5 101 50 54 50 70
fannkuchredux 5 52 5 58 50 99 50 108
fluentd 5 64 5 65 50 25 50 28
graphql 5 85 5 88 50 57 50 59
graphql-native 5 48 5 55 50 10 50 19
lee 5 23 5 26 50 10 50 10
matmul 5 50 5 51 50 85 50 95
nbody 5 248 5 242 50 575 50 658
nqueens 5 120 5 127 50 75 50 561
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 187 50 620 50 735
protoboeuf-encode 5 180 5 214 50 328 50 823
rack 5 591 5 641 50 945 50 1063
ruby-json 5 84 5 82 50 50 50 48
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 20 5 23 50 10 50 10
sudoku 5 48 5 51 50 162 50 161
tinygql 5 36 5 39 50 23 50 31
30k_ifelse 5 28 5 28 50 215 50 206
30k_methods 5 39 5 38 50 481 50 470
cfunc_itself 5 346 5 371 50 1147 50 1258
fib 5 127 5 147 50 910 50 933
getivar 5 207 5 303 50 2243 50 2749
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 362 50 404 50 654
respond_to 5 133 5 140 50 3258 50 3987
ruby-xor 5 239 5 262 50 801 50 1369
setivar 5 358 5 570 50 3178 50 5893
setivar_object 5 355 5 444 50 665 50 804
setivar_young 5 365 5 444 50 683 50 799
str_concat 5 397 5 423 50 961 50 1166
throw 5 1261 5 1240 50 1739 50 1650

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) 1452402 1197034 206 2230 0 0% 0 0 65.870916
chunky-png (click) 296217 235979 74 1073 1 0% 0 0 31.845074
erubi-rails (click) 1944340 1642181 263 3135 21 0% 0 0 87.427719
hexapdf (click) 1453380 1268759 595 13337 39 0% 0 0 382.031031
liquid-c (click) 512880 458865 114 1758 5 0% 0 0 50.572556
liquid-compile (click) 417132 355692 146 2173 2 0% 0 0 67.139589
liquid-render (click) 617231 528533 131 2325 8 0% 0 0 65.861147
lobsters (click) 8296422 7029662 3171 54456 112 0% 0 0 1846.67943
mail (click) 769260 702811 342 5636 40 0% 0 0 163.9026
psych-load (click) 253518 222378 61 645 3 0% 0 0 19.762927
railsbench (click) 3279662 2768265 1653 16830 54 0% 0 0 481.733747
rubocop (click) 5714139 4897553 2885 51106 113 0% 4 0 1503.481268
ruby-lsp (click) 820556 782962 305 4836 24 0% 0 0 137.182529
sequel (click) 461724 362763 11 94 0 0% 0 0 3.724864
binarytrees (click) 7093 6143 6 52 0 0% 0 0 2.243772
blurhash (click) 50446 50805 27 444 0 0% 0 0 14.338723
erubi (click) 236835 201971 5 99 0 0% 0 0 3.262615
etanni (click) 30101 29597 8 88 0 0% 0 0 3.017617
fannkuchredux (click) 23031 13626 3 249 0 0% 0 0 7.361156
fluentd (click) 376019 300438 7 93 0 0% 0 0 3.176976
graphql (click) 436143 373274 66 705 0 0% 0 0 20.731877
graphql-native (click) 370565 342567 37 293 0 0% 0 0 8.85939
lee (click) 282518 213152 45 799 0 0% 0 0 24.733549
matmul (click) 10810 11796 8 111 0 0% 0 0 3.633581
nbody (click) 13050 17086 6 172 0 0% 0 0 4.425848
nqueens (click) 20756 19597 5 247 0 0% 0 0 7.055435
optcarrot (click) 318856 234467 188 4395 34 0% 0 0 101.95199
protoboeuf (click) 150678 129601 12 1479 0 0% 0 0 42.508432
protoboeuf-encode (click) 221062 212146 14 1220 0 0% 0 0 31.72482
rack (click) 268930 203867 31 383 0 0% 0 0 10.258585
ruby-json (click) 24360 21181 8 181 0 0% 0 0 5.060354
rubyboy (click) 669205 567870 177 5886 40 0% 0 0 147.736574
rubykon (click) 135193 121132 137 1513 3 0% 0 0 42.908361
sudoku (click) 46753 50636 7 535 0 0% 0 0 15.920742
tinygql (click) 279338 226029 58 824 5 0% 0 0 22.784417
30k_ifelse (click) 5658774 5284843 9259 51667 0 0% 0 0 1447.973579
30k_methods (click) 2234569 1592883 5778 19351 0 0% 0 0 458.811764
cfunc_itself (click) 5130 4086 4 47 0 0% 0 0 1.309668
fib (click) 2599 2861 3 26 0 0% 0 0 0.946
getivar (click) 3501 4713 3 51 0 0% 0 0 1.338088
keyword_args (click) 6320 4813 5 49 0 0% 0 0 1.605828
loops-times (click) 6843 7499 5 72 0 0% 0 0 2.336736
object-new (click) 2301 2493 2 29 0 0% 0 0 0.965927
respond_to (click) 6409 6687 4 71 0 0% 0 0 1.918449
ruby-xor (click) 5331 6009 4 64 0 0% 0 0 1.922987
setivar (click) 2652 3389 3 31 0 0% 0 0 1.020196
setivar_object (click) 3181 3537 3 33 0 0% 0 0 1.140925
setivar_young (click) 4031 4260 4 44 0 0% 0 0 1.394966
str_concat (click) 5622 6117 6 64 0 0% 0 0 2.112858
throw (click) 5848 4291 5 46 0 0% 0 0 1.61709

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.