YJIT Benchmarks

Details for Benchmarks at 2025-03-09 03:43:24 GMT

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 87.6% faster than CRuby 3.5.0dev
  • 6.9% faster than YJIT 3.3.6
On railsbench it is
  • 103.8% faster than CRuby 3.5.0dev
  • 8.2% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 19 minutes
aarch64 runtime: 3 hours, 40 minutes

Performance on Headline Benchmarks

Select Platform
0.0 0.5 1.0 1.5 2.0 2.5 CRuby 3.3.6 CRuby 3.5.0dev YJIT 3.3.6 YJIT 3.5.0dev activerecord chunky-png erubi-rails hexapdf liquid-c liquid-compile liquid-render lobsters mail psych-load railsbench rubocop ruby-lsp sequel geomean* 1.03 2.38 2.46 1.10 1.80 2.34 1.03 2.21 2.37 1.03 1.88 1.89 1.04 1.52 1.62 1.05 1.52 1.49 1.02 2.60 2.83 1.00 1.69 1.71 1.00 1.51 1.53 1.02 1.48 1.65 1.00 1.88 2.04 1.02 1.94 2.07 1.03 1.68 1.97 0.97 1.49 1.46 1.02 1.80 1.92
Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on Headline Benchmarks

Select Platform
Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower is better.

Performance on Other Benchmarks

Select Platform
Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on Other Benchmarks

Select Platform
0.0 0.2 0.4 0.6 0.8 1.0 1.2 CRuby 3.3.6 CRuby 3.5.0dev YJIT 3.3.6 YJIT 3.5.0dev binarytrees blurhash erubi etanni fannkuchredux fluentd graphql graphql-native lee matmul nbody nqueens optcarrot protoboeuf protoboeuf-encode rack ruby-json rubyboy rubykon sudoku tinygql geomean* 0.78 1.03 0.76 0.65 1.02 0.69 0.78 1.06 1.38 0.81 1.02 0.84 0.63 1.02 0.66 1.29 1.04 1.29 0.79 1.07 0.88 0.90 0.98 0.82 0.88 1.07 0.92 0.70 1.01 0.72 0.63 1.02 0.66 0.65 1.01 0.72 0.78 1.11 0.82 0.89 1.13 0.78 0.91 1.09 1.15 0.76 1.07 0.81 0.65 1.02 0.68 0.79 1.04 0.93 0.71 1.07 0.75 0.63 1.02 0.67 0.75 1.07 0.83 0.77 1.05 0.83
Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower is better.

Performance on MicroBenchmarks

Select Platform
Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on MicroBenchmarks

Select Platform
Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower is better.

Want Raw Graphs and CSV?

Benchmarks Speed Details

Select Platform

Benchmark Memory Usage Details

Select Platform

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 165
chunky-png 5 32 5 35 50 16 50 35
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 440 50 595 50 638
liquid-compile 5 411 5 430 50 578 50 567
liquid-render 5 171 5 175 50 405 50 446
lobsters 5 19 5 19 50 10 50 10
mail 5 195 5 196 50 251 50 255
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 159 50 250 50 268
ruby-lsp 5 154 5 160 50 215 50 262
sequel 5 433 5 419 50 600 50 590
binarytrees 5 84 5 86 50 149 50 141
blurhash 5 82 5 88 50 127 50 145
erubi 5 96 5 147 50 87 50 151
etanni 5 90 5 102 50 54 50 73
fannkuchredux 5 52 5 55 50 99 50 110
fluentd 5 64 5 66 50 25 50 32
graphql 5 85 5 85 50 57 50 59
graphql-native 5 40 5 53 50 10 50 14
lee 5 22 5 23 50 10 50 10
matmul 5 51 5 53 50 85 50 97
nbody 5 248 5 290 50 577 50 637
nqueens 5 120 5 130 50 75 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 186 50 620 50 731
protoboeuf-encode 5 180 5 208 50 327 50 792
rack 5 585 5 640 50 948 50 1059
ruby-json 5 83 5 84 50 50 50 52
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 20 5 22 50 10 50 10
sudoku 5 48 5 51 50 164 50 162
tinygql 5 36 5 38 50 23 50 29
30k_ifelse 5 28 5 28 50 216 50 207
30k_methods 5 39 5 38 50 483 50 474
cfunc_itself 5 345 5 358 50 1147 50 1258
fib 5 127 5 133 50 910 50 933
getivar 5 207 5 304 50 2240 50 2746
keyword_args 5 107 5 109 50 1042 50 1243
loops-times 5 24 5 27 50 47 50 65
object-new 5 323 5 326 50 404 50 380
respond_to 5 133 5 138 50 3257 50 3981
ruby-xor 5 240 5 262 50 803 50 1383
setivar 5 358 5 639 50 3192 50 5928
setivar_object 5 355 5 481 50 712 50 818
setivar_young 5 365 5 481 50 755 50 816
str_concat 5 401 5 461 50 968 50 1213
throw 5 1266 5 1291 50 1773 50 1695

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) 1426894 1222706 209 2204 0 0% 0 0 64.273094
chunky-png (click) 316754 271412 84 1124 1 0% 0 0 33.054617
erubi-rails (click) 1902549 1617179 260 2984 19 0% 0 0 81.708211
hexapdf (click) 1432761 1222793 595 13139 38 0% 0 0 376.716729
liquid-c (click) 496788 439239 114 1743 5 0% 0 0 49.149535
liquid-compile (click) 406736 341828 146 2081 2 0% 0 0 65.182964
liquid-render (click) 593598 478442 131 2309 8 0% 0 0 64.905346
lobsters (click) 8136966 6919070 3158 52763 104 0% 0 0 1826.703463
mail (click) 731185 635733 342 5318 14 0% 0 0 155.777316
psych-load (click) 273979 240657 61 617 3 0% 0 0 19.297789
railsbench (click) 3232524 2711355 1645 16195 52 0% 0 0 466.71844
rubocop (click) 5666939 4787143 2887 50538 110 0% 4 0 1506.540904
ruby-lsp (click) 808055 688719 305 4735 24 0% 0 0 135.035424
sequel (click) 472663 405210 11 94 0 0% 0 0 3.350398
binarytrees (click) 7093 6143 6 52 0 0% 0 0 2.22396
blurhash (click) 50118 50863 27 438 0 0% 0 0 14.247813
erubi (click) 239332 210538 5 97 0 0% 0 0 3.190357
etanni (click) 27173 26329 8 88 0 0% 0 0 2.971945
fannkuchredux (click) 23046 13626 3 249 0 0% 0 0 7.299164
fluentd (click) 365180 316350 7 93 0 0% 0 0 3.215353
graphql (click) 412378 354118 66 676 0 0% 0 0 21.009708
graphql-native (click) 378718 324907 37 255 0 0% 0 0 8.721506
lee (click) 274387 222622 45 750 0 0% 0 0 23.782135
matmul (click) 10657 3512 8 109 0 0% 0 0 3.555024
nbody (click) 13065 17086 6 172 0 0% 0 0 4.40059
nqueens (click) 20163 27348 5 239 0 0% 0 0 6.83068
optcarrot (click) 319096 242804 188 4399 34 0% 0 0 102.260935
protoboeuf (click) 150678 129601 12 1479 0 0% 0 0 42.468985
protoboeuf-encode (click) 221107 212146 14 1220 0 0% 0 0 31.376607
rack (click) 255723 226155 32 385 0 0% 0 0 10.026182
ruby-json (click) 23859 20840 8 178 0 0% 0 0 5.14785
rubyboy (click) 650868 619108 177 5803 40 0% 0 0 144.920576
rubykon (click) 134065 128972 137 1489 3 0% 0 0 42.750627
sudoku (click) 45311 40871 7 516 0 0% 0 0 15.551963
tinygql (click) 295878 267710 58 762 5 0% 0 0 21.598586
30k_ifelse (click) 5658804 5284852 9259 51668 0 0% 0 0 1422.487557
30k_methods (click) 2234569 1592883 5778 19351 0 0% 0 0 452.59986
cfunc_itself (click) 5130 4086 4 47 0 0% 0 0 1.359698
fib (click) 2599 2861 3 26 0 0% 0 0 0.956188
getivar (click) 3501 4713 3 51 0 0% 0 0 1.314649
keyword_args (click) 6320 4813 5 49 0 0% 0 0 1.58811
loops-times (click) 6703 7405 5 71 0 0% 0 0 2.334308
object-new (click) 1933 2093 2 22 0 0% 0 0 0.842116
respond_to (click) 5868 6227 4 62 0 0% 0 0 1.729323
ruby-xor (click) 5331 6009 4 64 0 0% 0 0 1.921025
setivar (click) 2652 3389 3 31 0 0% 0 0 0.989237
setivar_object (click) 3181 3537 3 33 0 0% 0 0 1.114699
setivar_young (click) 3891 4259 4 41 0 0% 0 0 1.327559
str_concat (click) 5469 6016 6 62 0 0% 0 0 2.024526
throw (click) 5848 4291 5 46 0 0% 0 0 1.622409

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.