YJIT Benchmarks

Details for Benchmarks at 2024-08-08 15:28:07 UTC

YJIT metrics from the yjit-bench suite using Ruby 868d63f0a3

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 72.9% faster than CRuby 3.4.0dev
  • 2.4% faster than YJIT 3.3.4
On railsbench it is
  • 76.2% 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 51 10 48 10 114 10 120
chunky-png 10 18 10 16 10 36 10 36
erubi-rails 10 10 10 10 10 20 10 19
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 348 10 340 10 491 10 494
liquid-compile 10 344 10 335 10 482 10 515
liquid-render 10 141 10 132 10 349 10 358
lobsters 10 14 10 13 10 24 10 23
mail 10 158 10 150 10 227 10 220
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 136 10 130 10 228 10 235
ruby-lsp 10 127 10 123 10 212 10 208
sequel 10 321 10 307 10 416 10 414
binarytrees 10 51 10 49 10 118 10 115
blurhash 10 62 10 59 10 120 10 143
erubi 10 78 10 86 10 103 10 107
etanni 10 58 10 58 10 69 10 67
fannkuchredux 10 10 10 10 10 18 10 18
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 35 10 33 10 41 10 24
lee 10 11 10 10 10 20 10 20
matmul 10 10 10 10 10 15 10 15
nbody 10 208 10 199 10 407 10 466
nqueens 10 117 10 110 10 117 10 435
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 180 10 179 10 603 10 685
protoboeuf-encode 10 123 10 133 10 275 10 432
rack 10 462 10 487 10 805 10 881
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 30
tinygql 10 23 10 22 10 52 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 253 10 253 10 1104 10 1213
fib 10 105 10 107 10 616 10 618
getivar 10 257 10 219 10 1277 10 1726
keyword_args 10 88 10 87 10 720 10 947
object-new 10 228 10 208 10 300 10 266
respond_to 10 95 10 91 10 1728 10 2093
ruby-xor 10 31 10 28 10 99 10 131
setivar 10 418 10 373 10 2355 10 4838
setivar_object 10 264 10 240 10 652 10 695
setivar_young 10 262 10 240 10 650 10 692
str_concat 10 327 10 307 10 592 10 523
throw 10 987 10 869 10 1273 10 1145

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) 1363381 1223963 214 2169 0 0% 0 0 80.583755
chunky-png (click) 280984 266646 83 1054 1 0% 0 0 35.760574
erubi-rails (click) 1649565 1354841 274 2920 6 0% 0 0 101.56089
hexapdf (click) 1255643 1042679 505 11812 40 0% 0 0 410.454373
liquid-c (click) 463626 372254 119 1768 5 0% 0 0 57.03311
liquid-compile (click) 382879 324968 151 2085 2 0% 0 0 74.143749
liquid-render (click) 556684 493881 136 2323 8 0% 0 0 76.358288
lobsters (click) 7544075 6312051 3082 49818 81 0% 0 0 2240.254669
mail (click) 738431 692945 347 5554 14 0% 0 0 187.660788
psych-load (click) 250740 224349 61 594 3 0% 0 0 21.374116
railsbench (click) 2893693 2492458 1636 15971 57 0% 0 0 585.960164
rubocop (click) 5449980 4489229 2894 50974 114 0% 4 0 1921.409672
ruby-lsp (click) 790740 699239 309 4750 24 0% 0 0 160.447015
sequel (click) 429720 417287 16 115 0 0% 0 0 4.655782
binarytrees (click) 8404 7594 9 66 0 0% 0 0 2.981716
blurhash (click) 50094 43901 30 453 0 0% 0 0 17.670112
erubi (click) 215034 191639 10 112 0 0% 0 0 4.587998
etanni (click) 28405 26890 11 91 0 0% 0 0 3.508771
fannkuchredux (click) 23706 31291 4 252 0 0% 0 0 9.746384
fluentd (click) 329263 280958 4 28 0 0% 0 0 1.391844
graphql (click) 389013 345131 66 650 0 0% 0 0 22.977269
graphql-native (click) 359125 303325 41 273 0 0% 0 0 10.559032
lee (click) 235249 189053 34 531 0 0% 0 0 19.325236
matmul (click) 7957 8968 7 82 0 0% 0 0 3.200583
nbody (click) 15014 19017 10 191 0 0% 0 0 6.229277
nqueens (click) 23822 23823 9 279 0 0% 0 0 10.291553
optcarrot (click) 309010 266612 187 4398 34 0% 0 0 118.238454
protoboeuf (click) 139992 122036 16 1364 0 0% 0 0 48.541831
protoboeuf-encode (click) 212046 158560 18 1189 0 0% 0 0 36.537705
rack (click) 239834 215847 37 408 0 0% 0 0 12.923631
ruby-json (click) 19008 16632 7 164 0 0% 0 0 5.41705
rubykon (click) 128223 123238 136 1480 3 0% 0 0 47.971082
sudoku (click) 45292 24766 7 516 0 0% 0 0 19.065916
tinygql (click) 265790 240320 58 735 5 0% 0 0 24.077256
30k_ifelse (click) 5134313 4729205 9258 50774 0 0% 0 0 1891.612784
30k_methods (click) 2016559 1591611 5777 19335 0 0% 0 0 527.204641
cfunc_itself (click) 7172 6017 8 66 0 0% 0 0 2.359981
fib (click) 4609 4792 7 45 0 0% 0 0 1.853036
getivar (click) 5575 6644 7 70 0 0% 0 0 2.426711
keyword_args (click) 8042 6744 9 68 0 0% 0 0 2.633792
object-new (click) 4039 4024 6 41 0 0% 0 0 1.955912
respond_to (click) 7910 8158 8 81 0 0% 0 0 2.863584
ruby-xor (click) 5219 5772 4 58 0 0% 0 0 1.967306
setivar (click) 4726 5320 7 50 0 0% 0 0 1.905672
setivar_object (click) 5109 5228 7 50 0 0% 0 0 1.978389
setivar_young (click) 5819 5950 8 58 0 0% 0 0 2.208416
str_concat (click) 7415 7947 10 81 0 0% 0 0 3.248822
throw (click) 7538 6222 9 65 0 0% 0 0 2.653902

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.