YJIT Benchmarks

Details for Benchmarks at 2024-08-10 06:08:33 UTC

YJIT metrics from the yjit-bench suite using Ruby 7b7dde37f5

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 74.3% faster than CRuby 3.4.0dev
  • 3.6% faster than YJIT 3.3.4
On railsbench it is
  • 78.4% 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 48 10 110 10 124
chunky-png 10 18 10 17 10 36 10 39
erubi-rails 10 10 10 10 10 20 10 19
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 338 10 343 10 484 10 506
liquid-compile 10 339 10 335 10 481 10 493
liquid-render 10 141 10 133 10 352 10 366
lobsters 10 14 10 13 10 24 10 23
mail 10 158 10 155 10 233 10 223
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 119 10 124 10 214 10 211
sequel 10 315 10 308 10 423 10 412
binarytrees 10 51 10 49 10 119 10 115
blurhash 10 62 10 60 10 120 10 144
erubi 10 79 10 97 10 95 10 122
etanni 10 59 10 64 10 69 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 35 10 18 10 40 10 24
lee 10 11 10 10 10 19 10 20
matmul 10 10 10 10 10 15 10 16
nbody 10 207 10 199 10 407 10 473
nqueens 10 117 10 105 10 116 10 461
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 180 10 180 10 603 10 693
protoboeuf-encode 10 122 10 154 10 275 10 647
rack 10 463 10 488 10 814 10 908
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 24 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 256 10 252 10 1105 10 1212
fib 10 105 10 107 10 616 10 618
getivar 10 252 10 220 10 1278 10 1725
keyword_args 10 92 10 86 10 720 10 946
object-new 10 229 10 203 10 301 10 260
respond_to 10 95 10 91 10 1728 10 2094
ruby-xor 10 31 10 29 10 99 10 155
setivar 10 421 10 374 10 2355 10 4838
setivar_object 10 263 10 241 10 652 10 695
setivar_young 10 263 10 241 10 650 10 692
str_concat 10 327 10 358 10 592 10 692
throw 10 987 10 897 10 1275 10 1123

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) 1359835 1225467 214 2169 0 0% 0 0 81.037873
chunky-png (click) 270397 258460 83 1054 1 0% 0 0 35.883154
erubi-rails (click) 1631176 1356019 274 2940 6 0% 0 0 103.903386
hexapdf (click) 1247946 1100761 505 11811 40 0% 0 0 415.617383
liquid-c (click) 454859 359623 119 1768 5 0% 0 0 58.045135
liquid-compile (click) 384177 317555 151 2077 2 0% 0 0 73.368551
liquid-render (click) 554157 516113 136 2323 8 0% 0 0 77.337414
lobsters (click) 7551109 6390685 3082 49814 82 0% 0 0 2265.387691
mail (click) 740389 718765 347 5554 14 0% 0 0 188.764073
psych-load (click) 236852 211453 61 594 3 0% 0 0 21.645781
railsbench (click) 2904779 2501309 1636 15995 57 0% 0 0 593.245237
rubocop (click) 5451847 4645471 2894 50975 114 0% 4 0 1948.070797
ruby-lsp (click) 798421 725637 309 4745 24 0% 0 0 161.834925
sequel (click) 428771 374685 16 118 0 0% 0 0 5.438552
binarytrees (click) 8404 7594 9 66 0 0% 0 0 3.015827
blurhash (click) 50094 43901 30 453 0 0% 0 0 17.734334
erubi (click) 203256 181577 10 112 0 0% 0 0 4.550368
etanni (click) 24958 23898 11 92 0 0% 0 0 3.59697
fannkuchredux (click) 23706 31291 4 252 0 0% 0 0 9.862341
fluentd (click) 321760 258986 4 28 0 0% 0 0 1.333857
graphql (click) 391317 362764 66 650 0 0% 0 0 23.173162
graphql-native (click) 340327 278383 38 244 0 0% 0 0 9.14755
lee (click) 238913 199974 34 531 0 0% 0 0 19.37125
matmul (click) 7957 8968 7 82 0 0% 0 0 3.241406
nbody (click) 15014 19017 10 191 0 0% 0 0 6.215694
nqueens (click) 23822 23823 9 279 0 0% 0 0 10.350049
optcarrot (click) 309010 266612 187 4398 34 0% 0 0 119.209237
protoboeuf (click) 139992 122036 16 1364 0 0% 0 0 48.966031
protoboeuf-encode (click) 212046 158560 18 1189 0 0% 0 0 36.754768
rack (click) 240185 199733 37 413 0 0% 0 0 13.147195
ruby-json (click) 22939 19989 7 164 0 0% 0 0 5.420982
rubykon (click) 128223 123238 136 1480 3 0% 0 0 48.865528
sudoku (click) 45292 24766 7 516 0 0% 0 0 19.117224
tinygql (click) 243071 212057 58 735 5 0% 0 0 24.201914
30k_ifelse (click) 5134313 4729205 9258 50774 0 0% 0 0 1910.098938
30k_methods (click) 2016559 1591611 5777 19335 0 0% 0 0 540.499524
cfunc_itself (click) 7172 6017 8 66 0 0% 0 0 2.383023
fib (click) 4609 4792 7 45 0 0% 0 0 1.874345
getivar (click) 5575 6644 7 70 0 0% 0 0 2.451471
keyword_args (click) 8042 6744 9 68 0 0% 0 0 2.673766
object-new (click) 4039 4024 6 41 0 0% 0 0 2.113517
respond_to (click) 7910 8158 8 81 0 0% 0 0 2.900575
ruby-xor (click) 5219 5772 4 58 0 0% 0 0 1.981728
setivar (click) 4726 5320 7 50 0 0% 0 0 1.917408
setivar_object (click) 5109 5228 7 50 0 0% 0 0 2.002602
setivar_young (click) 5819 5950 8 58 0 0% 0 0 2.233658
str_concat (click) 7415 7947 10 81 0 0% 0 0 3.321688
throw (click) 7538 6222 9 65 0 0% 0 0 2.631284

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.