YJIT Benchmarks

Details for Benchmarks at 2024-08-12 06:08:34 UTC

YJIT metrics from the yjit-bench suite using Ruby ca5b7276c6

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 73.0% faster than CRuby 3.4.0dev
  • 4.4% faster than YJIT 3.3.4
On railsbench it is
  • 74.7% faster than CRuby 3.4.0dev
  • 1.3% slower than YJIT 3.3.4

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.4 warmups CRuby 3.3.4 iters CRuby 3.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.3.4 warmups YJIT 3.3.4 iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 10 50 10 48 10 110 10 123
chunky-png 10 18 10 17 10 36 10 39
erubi-rails 10 10 10 10 10 20 10 18
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 339 10 344 10 490 10 507
liquid-compile 10 338 10 334 10 481 10 496
liquid-render 10 140 10 134 10 353 10 362
lobsters 10 14 10 13 10 24 10 23
mail 10 160 10 151 10 227 10 224
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 131 10 228 10 238
ruby-lsp 10 131 10 129 10 181 10 211
sequel 10 321 10 309 10 420 10 416
binarytrees 10 51 10 49 10 118 10 115
blurhash 10 62 10 60 10 120 10 144
erubi 10 79 10 91 10 104 10 123
etanni 10 59 10 64 10 68 10 75
fannkuchredux 10 10 10 10 10 18 10 17
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 23 10 20 10 40 10 25
lee 10 11 10 10 10 20 10 19
matmul 10 10 10 10 10 15 10 16
nbody 10 207 10 197 10 407 10 473
nqueens 10 117 10 108 10 117 10 455
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 179 10 180 10 603 10 693
protoboeuf-encode 10 123 10 156 10 275 10 665
rack 10 459 10 488 10 816 10 915
ruby-json 10 10 10 10 10 10 10 10
rubykon 10 10 10 10 10 10 10 10
sudoku 10 10 10 10 10 31 10 31
tinygql 10 24 10 23 10 51 10 51
30k_ifelse 10 10 10 10 10 70 10 69
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 255 10 252 10 1105 10 1212
fib 10 105 10 108 10 616 10 618
getivar 10 255 10 220 10 1271 10 1727
keyword_args 10 92 10 81 10 720 10 946
object-new 10 228 10 203 10 300 10 260
respond_to 10 94 10 89 10 1729 10 2094
ruby-xor 10 31 10 27 10 99 10 154
setivar 10 422 10 374 10 2354 10 4838
setivar_object 10 263 10 241 10 652 10 695
setivar_young 10 263 10 241 10 651 10 692
str_concat 10 327 10 358 10 592 10 693
throw 10 988 10 875 10 1272 10 1120

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) 1359846 1154512 214 2169 0 0% 0 0 81.652283
chunky-png (click) 282743 260072 83 1054 1 0% 0 0 35.924265
erubi-rails (click) 1640620 1354831 274 2920 6 0% 0 0 101.320417
hexapdf (click) 1258637 1111226 506 11822 41 0% 0 0 414.79814
liquid-c (click) 465096 392209 119 1766 5 0% 0 0 58.047775
liquid-compile (click) 383915 337919 151 2063 2 0% 0 0 72.648293
liquid-render (click) 561080 481658 136 2323 8 0% 0 0 77.611847
lobsters (click) 7533061 6282551 3083 49802 81 0% 0 0 2254.891518
mail (click) 709955 641793 347 5554 14 0% 0 0 187.389646
psych-load (click) 238839 229594 61 594 3 0% 0 0 21.408024
railsbench (click) 2902193 2523452 1636 15965 57 0% 0 0 590.582795
rubocop (click) 5437851 4613935 2894 50954 114 0% 4 0 1937.88778
ruby-lsp (click) 793967 718622 309 4743 24 0% 0 0 161.575525
sequel (click) 432038 377930 16 117 0 0% 0 0 5.165329
binarytrees (click) 8404 7594 9 66 0 0% 0 0 2.965269
blurhash (click) 50094 43901 30 453 0 0% 0 0 17.881742
erubi (click) 211440 170125 10 112 0 0% 0 0 4.603051
etanni (click) 28405 26890 11 91 0 0% 0 0 3.495346
fannkuchredux (click) 23706 31291 4 252 0 0% 0 0 9.75578
fluentd (click) 325743 279842 4 28 0 0% 0 0 1.368566
graphql (click) 378497 359718 66 650 0 0% 0 0 23.329901
graphql-native (click) 347398 288790 41 273 0 0% 0 0 10.172753
lee (click) 237069 211446 34 531 0 0% 0 0 19.712357
matmul (click) 7957 8968 7 82 0 0% 0 0 3.207701
nbody (click) 15014 19017 10 191 0 0% 0 0 6.20207
nqueens (click) 23822 23823 9 279 0 0% 0 0 10.431415
optcarrot (click) 309010 266612 187 4398 34 0% 0 0 120.251306
protoboeuf (click) 139992 122036 16 1364 0 0% 0 0 48.642882
protoboeuf-encode (click) 212046 158560 18 1189 0 0% 0 0 36.805266
rack (click) 232948 208536 37 408 0 0% 0 0 13.063784
ruby-json (click) 22939 19989 7 164 0 0% 0 0 5.407713
rubykon (click) 128223 123238 136 1480 3 0% 0 0 48.477521
sudoku (click) 45292 24766 7 516 0 0% 0 0 19.169964
tinygql (click) 251070 215114 58 735 5 0% 0 0 24.374103
30k_ifelse (click) 5134313 4729205 9258 50774 0 0% 0 0 1934.437553
30k_methods (click) 2016559 1591611 5777 19335 0 0% 0 0 541.198826
cfunc_itself (click) 7172 6017 8 66 0 0% 0 0 2.377041
fib (click) 4609 4792 7 45 0 0% 0 0 1.863733
getivar (click) 5575 6644 7 70 0 0% 0 0 2.438155
keyword_args (click) 8042 6744 9 68 0 0% 0 0 2.657008
object-new (click) 4039 4024 6 41 0 0% 0 0 2.016655
respond_to (click) 7910 8158 8 81 0 0% 0 0 2.884813
ruby-xor (click) 5219 5772 4 58 0 0% 0 0 1.95933
setivar (click) 4726 5320 7 50 0 0% 0 0 1.902309
setivar_object (click) 5109 5228 7 50 0 0% 0 0 1.971821
setivar_young (click) 5819 5950 8 58 0 0% 0 0 2.173621
str_concat (click) 7415 7947 10 81 0 0% 0 0 3.270976
throw (click) 7538 6222 9 65 0 0% 0 0 2.764533

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.