YJIT Benchmarks

Details for Benchmarks at 2025-04-26 03:48:17 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 87.6% faster than CRuby 3.5.0dev
  • 8.0% faster than YJIT 3.3.6
On railsbench it is
  • 103.1% faster than CRuby 3.5.0dev
  • 6.6% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 11 minutes
aarch64 runtime: 3 hours, 34 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 82 5 87 50 156 50 172
chunky-png 5 31 5 32 50 15 50 22
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 411 5 430 50 573 50 625
liquid-compile 5 410 5 460 50 536 50 693
liquid-render 5 171 5 168 50 404 50 446
mail 5 189 5 176 50 252 50 207
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 161 50 249 50 276
ruby-lsp 5 158 5 164 50 247 50 273
sequel 5 419 5 424 50 578 50 595
binarytrees 5 84 5 81 50 149 50 133
blurhash 5 82 5 89 50 127 50 145
erubi 5 124 5 133 50 100 50 148
etanni 5 90 5 101 50 54 50 69
fannkuchredux 5 52 5 58 50 99 50 108
fluentd 5 64 5 61 50 24 50 26
graphql 5 85 5 83 50 57 50 60
graphql-native 5 49 5 58 50 10 50 16
lee 5 22 5 25 50 10 50 10
matmul 5 51 5 61 50 85 50 96
nbody 5 248 5 327 50 575 50 634
nqueens 5 120 5 128 50 75 50 561
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 183 50 620 50 722
protoboeuf-encode 5 180 5 208 50 326 50 844
rack 5 565 5 620 50 956 50 1064
ruby-json 5 84 5 80 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 162 50 161
tinygql 5 35 5 39 50 23 50 31
30k_ifelse 5 28 5 28 50 215 50 207
30k_methods 5 38 5 38 50 467 50 469
cfunc_itself 5 346 5 358 50 1147 50 1258
fib 5 126 5 145 50 910 50 933
getivar 5 207 5 335 50 2242 50 2767
keyword_args 5 107 5 110 50 1042 50 1243
loops-times 5 24 5 27 50 47 50 64
object-new 5 323 5 364 50 405 50 651
respond_to 5 133 5 139 50 3258 50 3989
ruby-xor 5 224 5 258 50 802 50 1369
setivar 5 358 5 652 50 3188 50 5931
setivar_object 5 355 5 481 50 665 50 809
setivar_young 5 365 5 480 50 685 50 804
str_concat 5 397 5 446 50 961 50 1165
throw 5 1259 5 1230 50 1748 50 1645

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) 1451662 1276951 206 2230 0 0% 0 0 63.649584
chunky-png (click) 301872 258322 74 1073 1 0% 0 0 31.375707
hexapdf (click) 1464942 1288889 595 13339 37 0% 0 0 379.694679
liquid-c (click) 479099 373772 114 1758 5 0% 0 0 48.318388
liquid-compile (click) 416339 338934 146 2209 2 0% 0 0 68.116826
liquid-render (click) 590631 512769 131 2325 8 0% 0 0 65.295965
mail (click) 767986 678291 342 5636 40 0% 0 0 164.670885
psych-load (click) 269547 245053 61 645 3 0% 0 0 19.581963
railsbench (click) 3293235 2718332 1653 16729 54 0% 0 0 473.528898
rubocop (click) 5711896 4913258 2885 51151 113 0% 4 0 1474.271097
ruby-lsp (click) 855340 781767 305 4836 24 0% 0 0 135.420153
sequel (click) 454263 365397 11 94 0 0% 0 0 3.458292
binarytrees (click) 7093 6143 6 52 0 0% 0 0 2.279817
blurhash (click) 50446 50805 27 444 0 0% 0 0 14.160053
erubi (click) 241971 195528 5 99 0 0% 0 0 3.216193
etanni (click) 30101 29597 8 88 0 0% 0 0 2.973283
fannkuchredux (click) 23031 13626 3 249 0 0% 0 0 7.314879
fluentd (click) 386311 309348 7 93 0 0% 0 0 3.130621
graphql (click) 419261 351895 66 705 0 0% 0 0 20.470902
graphql-native (click) 376021 331250 37 293 0 0% 0 0 8.538179
lee (click) 286921 243734 45 799 0 0% 0 0 23.913074
matmul (click) 10810 11796 8 111 0 0% 0 0 3.645986
nbody (click) 13050 17086 6 172 0 0% 0 0 4.539571
nqueens (click) 20756 19597 5 247 0 0% 0 0 7.044893
optcarrot (click) 318856 234467 188 4395 34 0% 0 0 101.451133
protoboeuf (click) 150678 129601 12 1479 0 0% 0 0 42.00329
protoboeuf-encode (click) 221062 212146 14 1220 0 0% 0 0 31.108994
rack (click) 231760 197750 31 383 0 0% 0 0 10.13571
ruby-json (click) 24065 20810 8 181 0 0% 0 0 5.075136
rubyboy (click) 658393 576545 177 5886 40 0% 0 0 143.57338
rubykon (click) 135193 121132 137 1513 3 0% 0 0 42.742425
sudoku (click) 46753 50636 7 535 0 0% 0 0 15.873863
tinygql (click) 275458 208831 58 824 5 0% 0 0 22.402382
30k_ifelse (click) 5658774 5284843 9259 51667 0 0% 0 0 1423.067461
30k_methods (click) 2234569 1592883 5778 19351 0 0% 0 0 453.650841
cfunc_itself (click) 5130 4086 4 47 0 0% 0 0 1.330191
fib (click) 2599 2861 3 26 0 0% 0 0 1.018403
getivar (click) 3501 4713 3 51 0 0% 0 0 1.371313
keyword_args (click) 6320 4813 5 49 0 0% 0 0 1.6486
loops-times (click) 6843 7499 5 72 0 0% 0 0 2.34103
object-new (click) 2301 2493 2 29 0 0% 0 0 0.946404
respond_to (click) 6409 6687 4 71 0 0% 0 0 1.899885
ruby-xor (click) 5331 6009 4 64 0 0% 0 0 1.885232
setivar (click) 2652 3389 3 31 0 0% 0 0 1.029464
setivar_object (click) 3181 3537 3 33 0 0% 0 0 1.128475
setivar_young (click) 4031 4260 4 44 0 0% 0 0 1.361724
str_concat (click) 5622 6117 6 64 0 0% 0 0 2.082069
throw (click) 5848 4291 5 46 0 0% 0 0 1.613228

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.