YJIT Benchmarks

Details for Benchmarks at 2025-01-22 03:43:52 UTC

YJIT metrics from the yjit-bench suite using Ruby 72fdba156d.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 90.4% faster than CRuby 3.5.0dev
  • 6.4% faster than YJIT 3.3.6
On railsbench it is
  • 94.2% faster than CRuby 3.5.0dev
  • 5.1% faster than YJIT 3.3.6
x86_64 runtime: 3 hours, 50 minutes
aarch64 runtime: 3 hours, 20 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 84 50 154 50 163
chunky-png 5 31 5 32 50 16 50 34
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 418 50 590 50 617
liquid-compile 5 412 5 407 50 536 50 558
liquid-render 5 171 5 166 50 403 50 434
lobsters 5 20 5 20 50 10 50 10
mail 5 191 5 192 50 238 50 254
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 149 50 249 50 264
ruby-lsp 5 154 5 156 50 246 50 249
sequel 5 428 5 423 50 572 50 593
binarytrees 5 84 5 82 50 148 50 140
blurhash 5 82 5 84 50 127 50 145
erubi 5 119 5 151 50 99 50 153
etanni 5 90 5 100 50 54 50 72
fannkuchredux 5 52 5 55 50 99 50 107
fluentd 5 64 5 73 50 26 50 28
graphql 5 85 5 85 50 56 50 54
graphql-native 5 40 5 49 50 10 50 14
lee 5 22 5 23 50 10 50 10
matmul 5 51 5 53 50 85 50 98
nbody 5 248 5 252 50 576 50 700
nqueens 5 120 5 123 50 75 50 562
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 176 50 619 50 729
protoboeuf-encode 5 179 5 198 50 326 50 787
rack 5 573 5 632 50 960 50 1063
ruby-json 5 83 5 83 50 49 50 51
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 163 50 170
tinygql 5 36 5 37 50 23 50 26
30k_ifelse 5 28 5 28 50 214 50 206
30k_methods 5 39 5 38 50 482 50 476
cfunc_itself 5 347 5 330 50 1147 50 1255
fib 5 127 5 133 50 910 50 932
getivar 5 207 5 314 50 2240 50 2750
keyword_args 5 107 5 99 50 1042 50 1240
loops-times 5 24 5 25 50 48 50 65
object-new 5 323 5 275 50 405 50 307
respond_to 5 133 5 141 50 3259 50 3980
ruby-xor 5 240 5 227 50 803 50 1375
setivar 5 358 5 592 50 3192 50 5896
setivar_object 5 355 5 411 50 700 50 776
setivar_young 5 365 5 414 50 744 50 804
str_concat 5 399 5 438 50 967 50 1205
throw 5 1268 5 1120 50 1780 50 1422

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) 1436893 1167207 209 2204 0 0% 0 0 63.704294
chunky-png (click) 301638 270783 84 1124 1 0% 0 0 33.379592
erubi-rails (click) 1921340 1575675 260 2949 19 0% 0 0 85.512196
hexapdf (click) 1433911 1192147 595 13143 37 0% 0 0 375.615922
liquid-c (click) 504961 445271 114 1743 5 0% 0 0 49.25708
liquid-compile (click) 399155 317352 146 2079 2 0% 0 0 64.900998
liquid-render (click) 576541 471205 131 2309 8 0% 0 0 65.007141
lobsters (click) 8107987 6818599 3206 52617 170 0% 0 0 1808.877837
mail (click) 739024 692324 342 5318 14 0% 0 0 153.92715
psych-load (click) 262706 222682 61 617 3 0% 0 0 19.420039
railsbench (click) 3235929 2790282 1645 16205 52 0% 0 0 466.811457
rubocop (click) 5663183 4874353 2887 50564 110 0% 4 0 1489.575827
ruby-lsp (click) 846086 780452 305 4734 24 0% 0 0 133.708434
sequel (click) 454303 394445 11 94 0 0% 0 0 3.622721
binarytrees (click) 7093 6143 6 52 0 0% 0 0 2.31297
blurhash (click) 50118 50863 27 438 0 0% 0 0 14.336932
erubi (click) 245866 199006 5 97 0 0% 0 0 3.311782
etanni (click) 27173 26329 8 88 0 0% 0 0 3.013847
fannkuchredux (click) 23046 13626 3 249 0 0% 0 0 7.509457
fluentd (click) 374189 323291 7 93 0 0% 0 0 3.156363
graphql (click) 419715 359714 66 676 0 0% 0 0 20.112706
graphql-native (click) 395807 354875 37 255 0 0% 0 0 8.809484
lee (click) 299370 268982 45 750 0 0% 0 0 23.209149
matmul (click) 10657 3512 8 109 0 0% 0 0 3.627684
nbody (click) 13065 17086 6 172 0 0% 0 0 4.408879
nqueens (click) 20163 27348 5 239 0 0% 0 0 7.09087
optcarrot (click) 319096 242804 188 4399 34 0% 0 0 101.726127
protoboeuf (click) 150678 129601 12 1479 0 0% 0 0 41.754148
protoboeuf-encode (click) 221107 212146 14 1220 0 0% 0 0 31.186336
rack (click) 247908 219984 32 385 0 0% 0 0 10.205351
ruby-json (click) 20126 17605 9 184 0 0% 0 0 5.205596
rubykon (click) 133148 127961 137 1480 3 0% 0 0 42.285503
sudoku (click) 45311 40871 7 516 0 0% 0 0 15.490441
tinygql (click) 297896 244500 58 762 5 0% 0 0 21.509722
30k_ifelse (click) 5658804 5284852 9259 51668 0 0% 0 0 1414.946861
30k_methods (click) 2234569 1592883 5778 19351 0 0% 0 0 451.463538
cfunc_itself (click) 5130 4086 4 47 0 0% 0 0 1.369034
fib (click) 2599 2861 3 26 0 0% 0 0 0.99395
getivar (click) 3501 4713 3 51 0 0% 0 0 1.364948
keyword_args (click) 6320 4813 5 49 0 0% 0 0 1.6355
loops-times (click) 6703 7405 5 71 0 0% 0 0 2.402217
object-new (click) 1933 2093 2 22 0 0% 0 0 0.817799
respond_to (click) 5868 6227 4 62 0 0% 0 0 1.799196
ruby-xor (click) 5331 6009 4 64 0 0% 0 0 1.889669
setivar (click) 2652 3389 3 31 0 0% 0 0 0.97688
setivar_object (click) 3181 3537 3 33 0 0% 0 0 1.14012
setivar_young (click) 3891 4259 4 41 0 0% 0 0 1.326104
str_concat (click) 5469 6016 6 62 0 0% 0 0 2.025937
throw (click) 5848 4291 5 46 0 0% 0 0 1.600336

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.