YJIT Benchmarks

Details for Benchmarks at 2025-05-07 03:50:50 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 89.2% faster than CRuby 3.5.0dev
  • 7.4% faster than YJIT 3.3.6
On railsbench it is
  • 100.5% faster than CRuby 3.5.0dev
  • 5.9% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 19 minutes
aarch64 runtime: 3 hours, 39 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 175
chunky-png 5 31 5 33 50 15 50 24
erubi-rails 5 16 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 418 5 406 50 587 50 624
liquid-compile 5 409 5 465 50 541 50 709
liquid-render 5 171 5 174 50 405 50 435
lobsters 5 19 5 19 50 10 50 10
mail 5 195 5 177 50 237 50 211
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 157 5 161 50 248 50 274
ruby-lsp 5 144 5 160 50 247 50 271
sequel 5 431 5 426 50 601 50 591
binarytrees 5 84 5 83 50 149 50 140
blurhash 5 82 5 88 50 127 50 145
erubi 5 125 5 145 50 100 50 134
etanni 5 89 5 103 50 55 50 72
fannkuchredux 5 52 5 57 50 99 50 114
fluentd 5 64 5 64 50 25 50 32
graphql 5 85 5 82 50 57 50 60
graphql-native 5 40 5 54 50 10 50 19
lee 5 23 5 26 50 10 50 10
matmul 5 50 5 51 50 85 50 99
nbody 5 248 5 250 50 575 50 669
nqueens 5 120 5 129 50 75 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 188 50 620 50 732
protoboeuf-encode 5 180 5 215 50 328 50 819
rack 5 573 5 643 50 956 50 1095
ruby-json 5 84 5 84 50 50 50 49
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 173
tinygql 5 36 5 39 50 23 50 33
30k_ifelse 5 28 5 28 50 215 50 207
30k_methods 5 39 5 38 50 480 50 469
cfunc_itself 5 346 5 373 50 1147 50 1258
fib 5 121 5 144 50 910 50 933
getivar 5 207 5 324 50 2244 50 2753
keyword_args 5 107 5 108 50 1042 50 1244
loops-times 5 24 5 27 50 47 50 65
object-new 5 322 5 359 50 404 50 636
respond_to 5 134 5 141 50 3258 50 3990
ruby-xor 5 242 5 263 50 802 50 1375
setivar 5 358 5 598 50 3189 50 5909
setivar_object 5 355 5 465 50 665 50 807
setivar_young 5 364 5 465 50 687 50 802
str_concat 5 396 5 462 50 962 50 1159
throw 5 1259 5 1275 50 1742 50 1694

Different Ruby configurations want different amounts of warmup. With no JIT, CRuby needs hardly any. YJIT warms up fairly quickly, while some JITs may start slower as they do more advanced compilation.

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) 1455052 1246439 206 2230 0 0% 0 0 63.626448
chunky-png (click) 298843 245170 74 1073 1 0% 0 0 31.236526
erubi-rails (click) 1936584 1592414 262 3104 21 0% 0 0 83.703025
hexapdf (click) 1460524 1267582 595 13346 41 0% 0 0 374.544983
liquid-c (click) 479595 399025 114 1759 5 0% 0 0 47.907847
liquid-compile (click) 442961 338047 146 2210 2 0% 0 0 68.605979
liquid-render (click) 591873 505625 131 2326 8 0% 0 0 65.048134
lobsters (click) 8303634 7043963 3170 54408 113 0% 0 0 1818.032055
mail (click) 779239 719808 342 5638 40 0% 0 0 163.530774
psych-load (click) 258040 233234 61 646 3 0% 0 0 19.364549
railsbench (click) 3299176 2756699 1653 16814 54 0% 0 0 475.633118
rubocop (click) 5737953 4918419 2885 51102 113 0% 4 0 1472.101766
ruby-lsp (click) 861639 753688 305 4837 24 0% 0 0 135.184193
sequel (click) 484859 416838 11 94 0 0% 0 0 3.206095
binarytrees (click) 7093 6143 6 52 0 0% 0 0 2.216346
blurhash (click) 50446 50805 27 444 0 0% 0 0 14.083234
erubi (click) 237301 191050 5 99 0 0% 0 0 3.230609
etanni (click) 30101 29597 8 88 0 0% 0 0 2.944922
fannkuchredux (click) 23031 13626 3 249 0 0% 0 0 7.285913
fluentd (click) 382847 308125 7 93 0 0% 0 0 3.137163
graphql (click) 432434 395103 66 705 0 0% 0 0 20.405487
graphql-native (click) 370582 344361 37 293 0 0% 0 0 8.507868
lee (click) 270306 213101 45 799 0 0% 0 0 24.006085
matmul (click) 10810 11796 8 111 0 0% 0 0 3.628629
nbody (click) 13050 17086 6 172 0 0% 0 0 4.382835
nqueens (click) 20756 19597 5 247 0 0% 0 0 6.988249
optcarrot (click) 318856 234467 188 4395 34 0% 0 0 100.794608
protoboeuf (click) 150678 129601 12 1479 0 0% 0 0 41.51614
protoboeuf-encode (click) 221062 212146 14 1220 0 0% 0 0 31.149759
rack (click) 229311 220261 31 384 0 0% 0 0 10.12198
ruby-json (click) 24065 20810 8 181 0 0% 0 0 5.042027
rubyboy (click) 696270 599613 177 5888 40 0% 0 0 145.32691
rubykon (click) 135591 113219 137 1515 3 0% 0 0 43.099575
sudoku (click) 46753 50636 7 535 0 0% 0 0 15.826593
tinygql (click) 286838 224991 58 824 5 0% 0 0 22.29663
30k_ifelse (click) 5658774 5284843 9259 51667 0 0% 0 0 1427.865272
30k_methods (click) 2234569 1592883 5778 19351 0 0% 0 0 452.857809
cfunc_itself (click) 5130 4086 4 47 0 0% 0 0 1.326112
fib (click) 2599 2861 3 26 0 0% 0 0 0.957733
getivar (click) 3501 4713 3 51 0 0% 0 0 1.340179
keyword_args (click) 6320 4813 5 49 0 0% 0 0 1.597567
loops-times (click) 6843 7499 5 72 0 0% 0 0 2.3306
object-new (click) 2301 2493 2 29 0 0% 0 0 0.961254
respond_to (click) 6409 6687 4 71 0 0% 0 0 1.863607
ruby-xor (click) 5331 6009 4 64 0 0% 0 0 1.904968
setivar (click) 2652 3389 3 31 0 0% 0 0 0.984981
setivar_object (click) 3181 3537 3 33 0 0% 0 0 1.129015
setivar_young (click) 4031 4260 4 44 0 0% 0 0 1.338425
str_concat (click) 5622 6117 6 64 0 0% 0 0 2.019038
throw (click) 5848 4291 5 46 0 0% 0 0 1.580282

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.