YJIT Benchmarks

Details for Benchmarks at 2025-04-27 03:49:16 UTC

YJIT metrics from the yjit-bench suite using Ruby 687bd83724.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 86.9% faster than CRuby 3.5.0dev
  • 7.6% faster than YJIT 3.3.6
On railsbench it is
  • 108.0% faster than CRuby 3.5.0dev
  • 8.1% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 10 minutes
aarch64 runtime: 3 hours, 33 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 86 50 156 50 182
chunky-png 5 31 5 33 50 15 50 23
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 412 5 433 50 591 50 537
liquid-compile 5 411 5 458 50 539 50 697
liquid-render 5 172 5 171 50 404 50 444
mail 5 195 5 179 50 238 50 205
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 157 5 160 50 252 50 275
ruby-lsp 5 154 5 163 50 245 50 273
sequel 5 434 5 423 50 597 50 594
binarytrees 5 84 5 81 50 149 50 135
blurhash 5 82 5 87 50 127 50 145
erubi 5 75 5 133 50 97 50 128
etanni 5 90 5 100 50 54 50 70
fannkuchredux 5 52 5 58 50 99 50 108
fluentd 5 64 5 62 50 25 50 28
graphql 5 85 5 88 50 58 50 54
graphql-native 5 40 5 56 50 10 50 19
lee 5 22 5 25 50 10 50 10
matmul 5 51 5 62 50 85 50 94
nbody 5 248 5 327 50 575 50 634
nqueens 5 120 5 125 50 75 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 185 50 620 50 735
protoboeuf-encode 5 177 5 208 50 330 50 826
rack 5 585 5 622 50 946 50 1067
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 162
tinygql 5 36 5 39 50 22 50 30
30k_ifelse 5 28 5 28 50 215 50 206
30k_methods 5 38 5 38 50 483 50 464
cfunc_itself 5 346 5 356 50 1147 50 1258
fib 5 127 5 143 50 910 50 933
getivar 5 206 5 326 50 2241 50 2770
keyword_args 5 107 5 110 50 1042 50 1244
loops-times 5 24 5 27 50 48 50 65
object-new 5 322 5 364 50 404 50 651
respond_to 5 134 5 140 50 3258 50 3990
ruby-xor 5 240 5 256 50 801 50 1380
setivar 5 358 5 652 50 3194 50 5936
setivar_object 5 355 5 481 50 667 50 809
setivar_young 5 365 5 480 50 685 50 804
str_concat 5 398 5 445 50 959 50 1157
throw 5 1260 5 1234 50 1743 50 1643

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) 1457983 1223766 206 2230 0 0% 0 0 67.308121
chunky-png (click) 291332 265788 74 1073 1 0% 0 0 31.44217
hexapdf (click) 1464345 1230300 595 13358 41 0% 0 0 375.722379
liquid-c (click) 487361 443985 114 1758 5 0% 0 0 48.013845
liquid-compile (click) 430759 368958 146 2217 2 0% 0 0 68.97998
liquid-render (click) 617142 536276 131 2325 8 0% 0 0 64.462406
mail (click) 791319 680660 342 5636 40 0% 0 0 163.909385
psych-load (click) 245416 224414 61 645 3 0% 0 0 19.448037
railsbench (click) 3272870 2858711 1653 16765 54 0% 0 0 475.317647
rubocop (click) 5711283 4879294 2885 51131 113 0% 4 0 1500.560562
ruby-lsp (click) 834043 696489 305 4829 24 0% 0 0 135.501707
sequel (click) 489755 411895 11 94 0 0% 0 0 3.353846
binarytrees (click) 7093 6143 6 52 0 0% 0 0 2.290527
blurhash (click) 50446 50805 27 444 0 0% 0 0 14.127277
erubi (click) 231942 212373 5 99 0 0% 0 0 3.191643
etanni (click) 30101 29597 8 88 0 0% 0 0 2.95847
fannkuchredux (click) 23031 13626 3 249 0 0% 0 0 7.344377
fluentd (click) 408558 304449 7 93 0 0% 0 0 3.197344
graphql (click) 409070 341178 66 705 0 0% 0 0 21.405144
graphql-native (click) 378266 349126 37 293 0 0% 0 0 8.822802
lee (click) 275849 234252 45 799 0 0% 0 0 24.191568
matmul (click) 10810 11796 8 111 0 0% 0 0 3.622148
nbody (click) 13050 17086 6 172 0 0% 0 0 4.439604
nqueens (click) 20756 19597 5 247 0 0% 0 0 7.031338
optcarrot (click) 318856 234467 188 4395 34 0% 0 0 100.857022
protoboeuf (click) 150678 129601 12 1479 0 0% 0 0 41.779225
protoboeuf-encode (click) 221062 212146 14 1220 0 0% 0 0 31.135161
rack (click) 251191 221246 31 383 0 0% 0 0 10.00796
ruby-json (click) 24302 21141 8 181 0 0% 0 0 4.995708
rubyboy (click) 670323 584359 177 5886 40 0% 0 0 143.078735
rubykon (click) 135193 121132 137 1513 3 0% 0 0 42.761852
sudoku (click) 46753 50636 7 535 0 0% 0 0 15.86497
tinygql (click) 288909 235075 58 824 5 0% 0 0 22.282154
30k_ifelse (click) 5658774 5284843 9259 51667 0 0% 0 0 1430.979054
30k_methods (click) 2234569 1592883 5778 19351 0 0% 0 0 453.202103
cfunc_itself (click) 5130 4086 4 47 0 0% 0 0 1.336395
fib (click) 2599 2861 3 26 0 0% 0 0 0.974671
getivar (click) 3501 4713 3 51 0 0% 0 0 1.332764
keyword_args (click) 6320 4813 5 49 0 0% 0 0 1.597476
loops-times (click) 6843 7499 5 72 0 0% 0 0 2.301438
object-new (click) 2301 2493 2 29 0 0% 0 0 0.937088
respond_to (click) 6409 6687 4 71 0 0% 0 0 1.860888
ruby-xor (click) 5331 6009 4 64 0 0% 0 0 1.939774
setivar (click) 2652 3389 3 31 0 0% 0 0 0.986926
setivar_object (click) 3181 3537 3 33 0 0% 0 0 1.115245
setivar_young (click) 4031 4260 4 44 0 0% 0 0 1.378891
str_concat (click) 5622 6117 6 64 0 0% 0 0 2.075169
throw (click) 5848 4291 5 46 0 0% 0 0 1.618019

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.