YJIT Benchmarks

Details for Benchmarks at 2024-11-01 03:47:50 UTC

YJIT metrics from the yjit-bench suite using Ruby 783dde2159

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 88.8% faster than CRuby 3.4.0dev
  • 4.2% faster than YJIT 3.3.4
On railsbench it is
  • 99.9% faster than CRuby 3.4.0dev
  • 7.5% faster 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 5 83 5 81 50 158 50 157
chunky-png 5 31 5 31 50 15 50 20
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 417 50 567 50 621
liquid-compile 5 411 5 405 50 540 50 552
liquid-render 5 170 5 166 50 403 50 416
lobsters 5 20 5 20 50 10 50 10
mail 5 188 5 180 50 235 50 236
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 157 5 155 50 252 50 264
ruby-lsp 5 154 5 151 50 240 50 242
sequel 5 429 5 419 50 572 50 578
binarytrees 5 83 5 83 50 146 50 148
blurhash 5 82 5 83 50 128 50 145
erubi 5 113 5 143 50 83 50 124
etanni 5 90 5 97 50 52 50 62
fannkuchredux 5 52 5 55 50 100 50 108
fluentd 5 61 5 59 50 22 50 30
graphql 5 85 5 83 50 57 50 57
graphql-native 5 39 5 53 50 10 50 14
lee 5 23 5 23 50 10 50 10
matmul 5 52 5 52 50 88 50 99
nbody 5 248 5 249 50 595 50 705
nqueens 5 119 5 120 50 74 50 562
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 174 50 615 50 680
protoboeuf-encode 5 178 5 196 50 328 50 787
rack 5 590 5 636 50 953 50 1078
ruby-json 5 85 5 82 50 50 50 49
rubykon 5 21 5 20 50 10 50 10
sudoku 5 48 5 48 50 163 50 160
tinygql 5 36 5 36 50 23 50 26
30k_ifelse 5 28 5 28 50 214 50 192
30k_methods 5 38 5 38 50 479 50 475
cfunc_itself 5 346 5 333 50 1046 50 1136
fib 5 127 5 127 50 899 50 962
getivar 5 207 5 214 50 2268 50 2616
keyword_args 5 108 5 97 50 959 50 1230
object-new 5 321 5 267 50 406 50 303
respond_to 5 137 5 140 50 3257 50 4037
ruby-xor 5 243 5 244 50 801 50 1379
setivar 5 361 5 357 50 3127 50 5718
setivar_object 5 372 5 350 50 762 50 787
setivar_young 5 372 5 352 50 771 50 845
str_concat 5 398 5 401 50 987 50 1163
throw 5 1266 5 1124 50 1723 50 1393

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) 1444705 1244818 213 2296 0 0% 0 0 67.156757
chunky-png (click) 300378 261515 86 1133 1 0% 0 0 34.325554
erubi-rails (click) 1943756 1656935 248 2891 8 0% 0 0 79.49936
hexapdf (click) 1490242 1254614 597 13849 39 0% 0 0 395.901986
liquid-c (click) 513054 466550 122 1906 5 0% 0 0 53.359459
liquid-compile (click) 441413 381050 150 2204 2 0% 0 0 66.592148
liquid-render (click) 604602 550849 139 2520 12 0% 0 0 70.880364
lobsters (click) 8313940 6984048 3212 54252 181 0% 0 0 1842.733251
mail (click) 773117 727814 346 5481 16 0% 0 0 158.874499
psych-load (click) 256642 230634 64 656 3 0% 0 0 20.685816
railsbench (click) 3302078 2910153 1635 16733 41 0% 0 0 478.066786
rubocop (click) 5807903 4996518 2891 52163 110 0% 4 0 1527.929283
ruby-lsp (click) 888618 782694 308 4990 26 0% 0 0 139.40559
sequel (click) 464735 431767 15 125 0 0% 0 0 4.719729
binarytrees (click) 9721 8668 8 76 0 0% 0 0 3.123131
blurhash (click) 57136 49713 29 501 0 0% 0 0 16.38921
erubi (click) 251186 218889 9 108 0 0% 0 0 3.701056
etanni (click) 27632 25855 9 81 0 0% 0 0 2.729834
fannkuchredux (click) 24038 30826 5 257 0 0% 0 0 7.829893
fluentd (click) 353174 292208 10 109 0 0% 0 0 3.886542
graphql (click) 398439 313167 69 695 0 0% 0 0 20.611026
graphql-native (click) 359766 315152 40 270 0 0% 0 0 8.607377
lee (click) 292461 258578 48 803 0 0% 0 0 24.604015
matmul (click) 11838 4563 10 119 0 0% 0 0 3.981936
nbody (click) 14884 19325 8 196 0 0% 0 0 5.188102
nqueens (click) 21155 28164 7 247 0 0% 0 0 7.389994
optcarrot (click) 327944 312320 190 4549 34 0% 0 0 104.312177
protoboeuf (click) 163392 155036 14 1610 0 0% 0 0 46.23506
protoboeuf-encode (click) 234584 230620 16 1249 0 0% 0 0 32.340569
rack (click) 253117 232337 36 417 0 0% 0 0 11.134179
ruby-json (click) 24665 21345 10 187 0 0% 0 0 5.382225
rubykon (click) 140693 120664 138 1568 3 0% 0 0 44.984392
sudoku (click) 48090 43120 9 536 0 0% 0 0 16.167081
tinygql (click) 266730 225954 61 787 5 0% 0 0 22.970277
30k_ifelse (click) 6315665 5791705 9261 56473 0 0% 0 0 1576.533302
30k_methods (click) 2235566 1593704 5780 19359 0 0% 0 0 454.772136
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.018258
fib (click) 4041 4120 5 37 0 0% 0 0 1.455138
getivar (click) 5037 6014 6 64 0 0% 0 0 1.889474
keyword_args (click) 7637 6022 7 60 0 0% 0 0 2.083117
object-new (click) 3469 3394 5 35 0 0% 0 0 1.385788
respond_to (click) 9322 2039 6 95 0 0% 0 0 2.755496
ruby-xor (click) 6437 6880 6 72 0 0% 0 0 2.273729
setivar (click) 4188 4690 6 44 0 0% 0 0 1.583271
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.661299
setivar_young (click) 5427 5560 7 54 0 0% 0 0 1.85254
str_concat (click) 7646 7893 9 81 0 0% 0 0 2.793211
throw (click) 7384 5592 8 59 0 0% 0 0 2.152028

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.