YJIT Benchmarks

Details for Benchmarks at 2024-09-08 04:00:21 UTC

YJIT metrics from the yjit-bench suite using Ruby 4774284124

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 74.4% faster than CRuby 3.4.0dev
  • 1.1% faster than YJIT 3.3.4
On railsbench it is
  • 78.1% 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 56 10 57 10 146 10 153
chunky-png 10 18 10 16 10 36 10 40
erubi-rails 10 10 10 10 10 22 10 21
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 349 10 348 10 498 10 509
liquid-compile 10 345 10 339 10 516 10 492
liquid-render 10 138 10 135 10 355 10 372
lobsters 10 13 10 12 10 23 10 23
mail 10 158 10 159 10 231 10 231
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 132 10 237 10 236
ruby-lsp 10 129 10 114 10 216 10 184
sequel 10 324 10 324 10 436 10 438
binarytrees 10 50 10 48 10 118 10 102
blurhash 10 62 10 62 10 120 10 149
erubi 10 83 10 98 10 105 10 125
etanni 10 60 10 65 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 29 10 29 10 32 10 32
lee 10 11 10 12 10 19 10 21
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 207 10 421 10 521
nqueens 10 113 10 114 10 113 10 447
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 157 10 151 10 582 10 688
protoboeuf-encode 10 133 10 161 10 293 10 653
rack 10 451 10 469 10 828 10 922
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 23 10 52 10 52
30k_ifelse 10 10 10 10 10 71 10 63
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 250 10 257 10 1108 10 1211
fib 10 102 10 100 10 616 10 623
getivar 10 213 10 223 10 1246 10 1731
keyword_args 10 90 10 88 10 729 10 948
object-new 10 229 10 195 10 308 10 240
respond_to 10 91 10 92 10 1785 10 2216
ruby-xor 10 30 10 25 10 92 10 172
setivar 10 348 10 381 10 2319 10 3103
setivar_object 10 215 10 217 10 536 10 506
setivar_young 10 216 10 218 10 528 10 505
str_concat 10 317 10 342 10 658 10 744
throw 10 970 10 805 10 1344 10 1025

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) 1456522 1280178 214 2301 0 0% 0 0 80.969963
chunky-png (click) 290599 256428 82 1090 1 0% 0 0 37.499076
erubi-rails (click) 1931238 1601604 245 2810 8 0% 0 0 88.947131
hexapdf (click) 1361536 1152364 508 12613 37 0% 0 0 436.036038
liquid-c (click) 507012 404727 118 1858 5 0% 0 0 60.944249
liquid-compile (click) 422023 365866 150 2221 2 0% 0 0 80.531707
liquid-render (click) 604025 538612 135 2474 12 0% 0 0 81.108608
lobsters (click) 8066131 6676240 3086 51871 182 0% 0 0 2070.895142
mail (click) 747504 666620 346 5481 16 0% 0 0 186.906152
psych-load (click) 279420 244849 60 615 3 0% 0 0 22.459949
railsbench (click) 3312628 2866577 1631 16719 41 0% 0 0 563.32057
rubocop (click) 5804794 5010492 2891 52151 110 0% 4 0 1857.790213
ruby-lsp (click) 845226 720057 308 4986 26 0% 0 0 169.40507
sequel (click) 469092 435075 15 124 0 0% 0 0 5.56622
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.497531
blurhash (click) 57136 49713 29 501 0 0% 0 0 20.049543
erubi (click) 236895 216520 9 108 0 0% 0 0 4.236853
etanni (click) 28250 26371 10 86 0 0% 0 0 3.269934
fannkuchredux (click) 22545 29447 3 240 0 0% 0 0 9.258542
fluentd (click) 331788 271808 3 22 0 0% 0 0 0.999434
graphql (click) 414453 370247 65 649 0 0% 0 0 22.718926
graphql-native (click) 385826 320612 40 270 0 0% 0 0 10.331175
lee (click) 248782 224764 33 567 0 0% 0 0 20.694157
matmul (click) 7323 8338 6 76 0 0% 0 0 2.955879
nbody (click) 15399 19810 9 201 0 0% 0 0 6.397856
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.351573
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 121.415469
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 56.911314
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 38.414951
rack (click) 264498 241764 36 420 0 0% 0 0 13.406266
ruby-json (click) 21936 18803 6 158 0 0% 0 0 5.165328
rubykon (click) 140687 120490 135 1573 3 0% 0 0 52.648961
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.927768
tinygql (click) 273444 248084 57 743 5 0% 0 0 24.766779
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 1913.794867
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 547.849129
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.268936
fib (click) 4585 4605 6 42 0 0% 0 0 1.836652
getivar (click) 5037 6014 6 64 0 0% 0 0 2.122578
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.667337
object-new (click) 3469 3394 5 35 0 0% 0 0 1.957086
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.565151
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.747744
setivar (click) 4188 4690 6 44 0 0% 0 0 1.662401
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.851169
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.106737
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.189775
throw (click) 7384 5592 8 59 0 0% 0 0 2.485423

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.