YJIT Benchmarks

Details for Benchmarks at 2025-01-31 03:43:29 UTC

YJIT metrics from the yjit-bench suite using Ruby 366462bd46.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 89.8% faster than CRuby 3.5.0dev
  • 5.2% faster than YJIT 3.3.6
On railsbench it is
  • 96.6% faster than CRuby 3.5.0dev
  • 3.8% 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 83 50 154 50 162
chunky-png 5 31 5 32 50 15 50 33
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 410 5 418 50 571 50 629
liquid-compile 5 408 5 418 50 575 50 589
liquid-render 5 172 5 168 50 402 50 414
lobsters 5 20 5 20 50 10 50 10
mail 5 179 5 192 50 236 50 244
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 157 5 156 50 247 50 265
ruby-lsp 5 157 5 158 50 246 50 266
sequel 5 433 5 396 50 599 50 549
binarytrees 5 84 5 79 50 148 50 128
blurhash 5 82 5 81 50 127 50 145
erubi 5 116 5 148 50 88 50 152
etanni 5 90 5 100 50 53 50 73
fannkuchredux 5 52 5 55 50 99 50 105
fluentd 5 63 5 63 50 26 50 30
graphql 5 84 5 83 50 57 50 58
graphql-native 5 48 5 53 50 10 50 12
lee 5 22 5 23 50 10 50 10
matmul 5 51 5 53 50 85 50 99
nbody 5 248 5 251 50 577 50 702
nqueens 5 120 5 123 50 75 50 565
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 171 5 176 50 618 50 728
protoboeuf-encode 5 180 5 198 50 326 50 824
rack 5 592 5 629 50 949 50 1064
ruby-json 5 83 5 84 50 49 50 50
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 164 50 169
tinygql 5 36 5 37 50 22 50 29
30k_ifelse 5 28 5 28 50 215 50 207
30k_methods 5 38 5 38 50 484 50 475
cfunc_itself 5 346 5 322 50 1147 50 1255
fib 5 127 5 130 50 908 50 933
getivar 5 207 5 324 50 2242 50 2759
keyword_args 5 107 5 104 50 1042 50 1239
loops-times 5 24 5 25 50 48 50 65
object-new 5 323 5 280 50 405 50 308
respond_to 5 134 5 138 50 3257 50 3982
ruby-xor 5 240 5 238 50 802 50 1374
setivar 5 357 5 559 50 3190 50 5883
setivar_object 5 355 5 403 50 699 50 730
setivar_young 5 365 5 403 50 743 50 791
str_concat 5 400 5 420 50 965 50 1204
throw 5 1263 5 1137 50 1783 50 1441

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) 1429971 1200741 209 2204 0 0% 0 0 63.941264
chunky-png (click) 296428 252196 84 1124 1 0% 0 0 33.252887
erubi-rails (click) 1911216 1583536 259 2973 19 0% 0 0 81.263945
hexapdf (click) 1445564 1209356 596 13146 42 0% 0 0 376.899287
liquid-c (click) 473625 418538 114 1740 5 0% 0 0 47.977043
liquid-compile (click) 424013 339268 146 2090 2 0% 0 0 65.715537
liquid-render (click) 601136 484202 131 2309 8 0% 0 0 65.069614
lobsters (click) 8127041 6812938 3207 52543 169 0% 0 0 1783.97751
mail (click) 756713 649879 342 5318 14 0% 0 0 152.691853
psych-load (click) 252797 222296 61 617 3 0% 0 0 19.205006
railsbench (click) 3244195 2764760 1645 16205 52 0% 0 0 467.684541
rubocop (click) 5680369 4947131 2887 50556 110 0% 4 0 1475.693484
ruby-lsp (click) 833248 753651 305 4735 24 0% 0 0 133.140666
sequel (click) 450746 401625 11 94 0 0% 0 0 3.141162
binarytrees (click) 7093 6143 6 52 0 0% 0 0 2.243881
blurhash (click) 50118 50863 27 438 0 0% 0 0 14.193988
erubi (click) 225854 196816 5 97 0 0% 0 0 3.241883
etanni (click) 27173 26329 8 88 0 0% 0 0 3.007701
fannkuchredux (click) 23046 13626 3 249 0 0% 0 0 7.510966
fluentd (click) 390918 328168 7 93 0 0% 0 0 3.158946
graphql (click) 404031 370355 66 676 0 0% 0 0 21.200582
graphql-native (click) 370798 318479 37 255 0 0% 0 0 8.621815
lee (click) 278966 220368 45 750 0 0% 0 0 23.308232
matmul (click) 10657 3512 8 109 0 0% 0 0 3.573991
nbody (click) 13065 17086 6 172 0 0% 0 0 4.575638
nqueens (click) 20163 27348 5 239 0 0% 0 0 7.002769
optcarrot (click) 319096 242804 188 4399 34 0% 0 0 101.18388
protoboeuf (click) 150678 129601 12 1479 0 0% 0 0 41.945576
protoboeuf-encode (click) 221107 212146 14 1220 0 0% 0 0 31.380897
rack (click) 256402 210044 32 385 0 0% 0 0 10.193882
ruby-json (click) 20461 17978 8 181 0 0% 0 0 5.08936
rubykon (click) 133544 111856 137 1482 3 0% 0 0 42.240947
sudoku (click) 45311 40871 7 516 0 0% 0 0 15.535451
tinygql (click) 276338 225704 58 762 5 0% 0 0 21.380432
30k_ifelse (click) 5658804 5284852 9259 51668 0 0% 0 0 1407.593403
30k_methods (click) 2234569 1592883 5778 19351 0 0% 0 0 447.298456
cfunc_itself (click) 5130 4086 4 47 0 0% 0 0 1.341945
fib (click) 2599 2861 3 26 0 0% 0 0 1.0105
getivar (click) 3501 4713 3 51 0 0% 0 0 1.334608
keyword_args (click) 6320 4813 5 49 0 0% 0 0 1.562988
loops-times (click) 6703 7405 5 71 0 0% 0 0 2.358081
object-new (click) 1933 2093 2 22 0 0% 0 0 0.852714
respond_to (click) 5868 6227 4 62 0 0% 0 0 1.75512
ruby-xor (click) 5331 6009 4 64 0 0% 0 0 1.849169
setivar (click) 2652 3389 3 31 0 0% 0 0 1.036513
setivar_object (click) 3181 3537 3 33 0 0% 0 0 1.122136
setivar_young (click) 3891 4259 4 41 0 0% 0 0 1.326553
str_concat (click) 5469 6016 6 62 0 0% 0 0 2.011473
throw (click) 5848 4291 5 46 0 0% 0 0 1.625022

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.