YJIT Benchmarks

Details for Benchmarks at 2025-04-29 03:48:49 UTC

YJIT metrics from the yjit-bench suite using Ruby 6052b12de4.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 87.7% faster than CRuby 3.5.0dev
  • 7.0% faster than YJIT 3.3.6
On railsbench it is
  • 100.4% faster than CRuby 3.5.0dev
  • 9.4% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 19 minutes
aarch64 runtime: 3 hours, 41 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 155 50 173
chunky-png 5 31 5 32 50 14 50 23
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 410 5 415 50 572 50 571
liquid-compile 5 412 5 465 50 537 50 697
liquid-render 5 170 5 165 50 407 50 381
lobsters 5 19 5 20 50 10 50 10
mail 5 196 5 176 50 241 50 213
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 160 50 248 50 273
ruby-lsp 5 155 5 165 50 249 50 277
sequel 5 432 5 420 50 570 50 598
binarytrees 5 84 5 81 50 149 50 135
blurhash 5 82 5 87 50 127 50 145
erubi 5 118 5 145 50 90 50 149
etanni 5 90 5 101 50 54 50 70
fannkuchredux 5 52 5 59 50 99 50 111
fluentd 5 63 5 61 50 26 50 30
graphql 5 85 5 82 50 57 50 59
graphql-native 5 49 5 56 50 10 50 20
lee 5 22 5 25 50 10 50 10
matmul 5 50 5 63 50 85 50 95
nbody 5 248 5 330 50 575 50 658
nqueens 5 120 5 129 50 75 50 559
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 188 50 620 50 731
protoboeuf-encode 5 180 5 209 50 329 50 827
rack 5 571 5 611 50 953 50 1055
ruby-json 5 84 5 81 50 49 50 47
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 36 5 38 50 22 50 33
30k_ifelse 5 28 5 28 50 215 50 207
30k_methods 5 39 5 38 50 471 50 471
cfunc_itself 5 346 5 362 50 1147 50 1258
fib 5 127 5 145 50 910 50 933
getivar 5 207 5 327 50 2241 50 2754
keyword_args 5 107 5 102 50 1042 50 1243
loops-times 5 24 5 27 50 48 50 65
object-new 5 322 5 359 50 404 50 647
respond_to 5 133 5 138 50 3258 50 3988
ruby-xor 5 240 5 252 50 802 50 1384
setivar 5 358 5 589 50 3185 50 5895
setivar_object 5 355 5 472 50 665 50 813
setivar_young 5 365 5 472 50 685 50 803
str_concat 5 398 5 457 50 961 50 1151
throw 5 1259 5 1256 50 1731 50 1609

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) 1449530 1256901 206 2230 0 0% 0 0 64.177487
chunky-png (click) 287276 221255 74 1078 1 0% 0 0 31.746024
erubi-rails (click) 1925260 1640558 262 3067 21 0% 0 0 83.331828
hexapdf (click) 1456576 1247312 596 13350 40 0% 0 0 381.516723
liquid-c (click) 499051 423461 114 1758 5 0% 0 0 48.319718
liquid-compile (click) 418128 365953 146 2201 2 0% 0 0 66.828427
liquid-render (click) 613181 484597 131 2325 8 0% 0 0 64.898733
lobsters (click) 8166555 6958876 3172 53182 109 0% 0 0 1818.351325
mail (click) 789624 671648 342 5636 40 0% 0 0 165.204976
psych-load (click) 285477 266124 61 645 3 0% 0 0 19.994211
railsbench (click) 3280574 2766186 1653 16733 54 0% 0 0 476.516333
rubocop (click) 5711912 4854189 2885 51135 113 0% 4 0 1515.015891
ruby-lsp (click) 835404 773318 305 4824 24 0% 0 0 134.627143
sequel (click) 456802 378191 11 94 0 0% 0 0 3.474449
binarytrees (click) 7093 6143 6 52 0 0% 0 0 2.22104
blurhash (click) 50446 50805 27 444 0 0% 0 0 14.147063
erubi (click) 230995 193799 5 99 0 0% 0 0 3.246239
etanni (click) 30101 29597 8 88 0 0% 0 0 2.974257
fannkuchredux (click) 23031 13626 3 249 0 0% 0 0 7.33911
fluentd (click) 404665 310336 7 93 0 0% 0 0 3.277843
graphql (click) 404516 355702 66 705 0 0% 0 0 20.466053
graphql-native (click) 400679 368420 37 293 0 0% 0 0 8.469186
lee (click) 303437 248547 45 799 0 0% 0 0 24.355199
matmul (click) 10810 11796 8 111 0 0% 0 0 3.639144
nbody (click) 13050 17086 6 172 0 0% 0 0 4.40966
nqueens (click) 20756 19597 5 247 0 0% 0 0 7.036145
optcarrot (click) 318856 234467 188 4395 34 0% 0 0 101.823789
protoboeuf (click) 150678 129601 12 1479 0 0% 0 0 42.004183
protoboeuf-encode (click) 221062 212146 14 1220 0 0% 0 0 31.183753
rack (click) 230886 188874 31 383 0 0% 0 0 10.080808
ruby-json (click) 24360 21181 8 181 0 0% 0 0 5.058696
rubyboy (click) 697794 633559 177 5886 40 0% 0 0 146.058536
rubykon (click) 135591 113219 137 1515 3 0% 0 0 43.329056
sudoku (click) 46753 50636 7 535 0 0% 0 0 15.899997
tinygql (click) 291225 230126 58 824 5 0% 0 0 22.64876
30k_ifelse (click) 5658774 5284843 9259 51667 0 0% 0 0 1438.91472
30k_methods (click) 2234569 1592883 5778 19351 0 0% 0 0 455.804503
cfunc_itself (click) 5130 4086 4 47 0 0% 0 0 1.340755
fib (click) 2599 2861 3 26 0 0% 0 0 0.986726
getivar (click) 3501 4713 3 51 0 0% 0 0 1.328892
keyword_args (click) 6320 4813 5 49 0 0% 0 0 1.575888
loops-times (click) 6843 7499 5 72 0 0% 0 0 2.317281
object-new (click) 2301 2493 2 29 0 0% 0 0 0.963565
respond_to (click) 6409 6687 4 71 0 0% 0 0 1.876024
ruby-xor (click) 5331 6009 4 64 0 0% 0 0 1.879344
setivar (click) 2652 3389 3 31 0 0% 0 0 1.007879
setivar_object (click) 3181 3537 3 33 0 0% 0 0 1.147974
setivar_young (click) 4031 4260 4 44 0 0% 0 0 1.382534
str_concat (click) 5622 6117 6 64 0 0% 0 0 2.062536
throw (click) 5848 4291 5 46 0 0% 0 0 1.580659

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.