YJIT Benchmarks

Details for Benchmarks at 2024-08-24 19:08:28 UTC

YJIT metrics from the yjit-bench suite using Ruby 519152db6d

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 74.4% faster than CRuby 3.4.0dev
  • 3.6% faster than YJIT 3.3.4
On railsbench it is
  • 80.5% faster than CRuby 3.4.0dev
  • the same speed as 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 49 10 116 10 121
chunky-png 10 18 10 18 10 35 10 39
erubi-rails 10 10 10 10 10 21 10 21
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 348 10 351 10 487 10 513
liquid-compile 10 345 10 342 10 499 10 500
liquid-render 10 139 10 135 10 353 10 372
lobsters 10 14 10 13 10 25 10 23
mail 10 162 10 156 10 238 10 227
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 134 10 132 10 234 10 239
ruby-lsp 10 130 10 125 10 212 10 218
sequel 10 322 10 319 10 439 10 432
binarytrees 10 51 10 49 10 118 10 112
blurhash 10 63 10 63 10 120 10 147
erubi 10 83 10 98 10 104 10 125
etanni 10 60 10 64 10 69 10 76
fannkuchredux 10 10 10 10 10 17 10 18
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 28 10 31 10 33 10 35
lee 10 11 10 12 10 20 10 21
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 215 10 421 10 514
nqueens 10 113 10 114 10 113 10 442
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 181 10 184 10 572 10 685
protoboeuf-encode 10 125 10 163 10 283 10 636
rack 10 458 10 479 10 818 10 902
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 28 10 32
tinygql 10 23 10 22 10 51 10 52
30k_ifelse 10 10 10 10 10 70 10 69
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 250 10 249 10 1108 10 1213
fib 10 103 10 102 10 616 10 618
getivar 10 215 10 242 10 1255 10 1748
keyword_args 10 90 10 86 10 729 10 947
object-new 10 230 10 217 10 308 10 287
respond_to 10 89 10 93 10 1785 10 2094
ruby-xor 10 30 10 25 10 92 10 165
setivar 10 348 10 360 10 2320 10 4823
setivar_object 10 216 10 222 10 537 10 516
setivar_young 10 218 10 227 10 528 10 535
str_concat 10 319 10 357 10 658 10 684
throw 10 968 10 907 10 1341 10 1212

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) 1361197 1231015 214 2169 0 0% 0 0 81.874231
chunky-png (click) 289629 259069 83 1054 1 0% 0 0 36.027442
erubi-rails (click) 1649728 1428890 275 2924 6 0% 0 0 101.659062
hexapdf (click) 1250491 1069782 505 11810 39 0% 0 0 412.855766
liquid-c (click) 465039 369993 119 1768 5 0% 0 0 58.224202
liquid-compile (click) 401055 366038 151 2092 2 0% 0 0 74.857884
liquid-render (click) 572835 500894 136 2323 8 0% 0 0 76.999705
lobsters (click) 7522050 6240816 3081 49657 81 0% 0 0 2239.056326
mail (click) 744256 705673 347 5588 14 0% 0 0 188.790907
psych-load (click) 242438 225664 61 594 3 0% 0 0 21.313817
railsbench (click) 2889788 2546262 1637 15971 57 0% 0 0 589.091159
rubocop (click) 5450625 4644453 2894 50961 114 0% 4 0 1950.520923
ruby-lsp (click) 798416 733841 309 4745 24 0% 0 0 161.55551
sequel (click) 444255 422621 16 118 0 0% 0 0 5.364015
binarytrees (click) 8404 7594 9 66 0 0% 0 0 3.007477
blurhash (click) 50094 43901 30 453 0 0% 0 0 17.686479
erubi (click) 227743 202822 10 112 0 0% 0 0 4.708404
etanni (click) 24958 23898 11 92 0 0% 0 0 3.608252
fannkuchredux (click) 23706 31291 4 252 0 0% 0 0 9.665972
fluentd (click) 323893 225934 4 28 0 0% 0 0 1.334832
graphql (click) 391317 346417 66 650 0 0% 0 0 23.157477
graphql-native (click) 342343 305030 42 278 0 0% 0 0 10.770703
lee (click) 235486 179252 34 531 0 0% 0 0 19.70669
matmul (click) 7957 8968 7 82 0 0% 0 0 3.21586
nbody (click) 15014 19017 10 191 0 0% 0 0 6.163214
nqueens (click) 23822 23823 9 279 0 0% 0 0 10.351387
optcarrot (click) 309010 266612 187 4398 34 0% 0 0 120.115387
protoboeuf (click) 139992 122036 16 1364 0 0% 0 0 48.451467
protoboeuf-encode (click) 212046 174944 18 1189 0 0% 0 0 36.843372
rack (click) 237152 222373 37 408 0 0% 0 0 12.953277
ruby-json (click) 22939 19989 7 164 0 0% 0 0 5.371107
rubykon (click) 128223 123238 136 1480 3 0% 0 0 48.378962
sudoku (click) 45292 24766 7 516 0 0% 0 0 19.219201
tinygql (click) 266197 232489 58 735 5 0% 0 0 24.354911
30k_ifelse (click) 5134313 4729205 9258 50774 0 0% 0 0 1939.570861
30k_methods (click) 2016559 1591611 5777 19335 0 0% 0 0 533.791787
cfunc_itself (click) 7172 6017 8 66 0 0% 0 0 2.337705
fib (click) 4609 4792 7 45 0 0% 0 0 1.839859
getivar (click) 5575 6644 7 70 0 0% 0 0 2.343898
keyword_args (click) 8042 6744 9 68 0 0% 0 0 2.63394
object-new (click) 4039 4024 6 41 0 0% 0 0 1.93958
respond_to (click) 7910 8158 8 81 0 0% 0 0 2.861774
ruby-xor (click) 5219 5772 4 58 0 0% 0 0 1.958194
setivar (click) 4726 5320 7 50 0 0% 0 0 1.88775
setivar_object (click) 5109 5228 7 50 0 0% 0 0 1.924865
setivar_young (click) 5819 5950 8 58 0 0% 0 0 2.194903
str_concat (click) 7415 7947 10 81 0 0% 0 0 3.203894
throw (click) 7538 6222 9 65 0 0% 0 0 2.649173

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.