YJIT Benchmarks

Details for Benchmarks at 2024-08-16 19:08:32 UTC

YJIT metrics from the yjit-bench suite using Ruby 1917c8c8f3

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 74.6% faster than CRuby 3.4.0dev
  • 2.9% faster than YJIT 3.3.4
On railsbench it is
  • 81.1% faster than CRuby 3.4.0dev
  • 1.6% 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 10 50 10 48 10 116 10 116
chunky-png 10 18 10 18 10 35 10 40
erubi-rails 10 10 10 10 10 21 10 20
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 349 10 347 10 487 10 503
liquid-compile 10 341 10 343 10 521 10 505
liquid-render 10 139 10 136 10 356 10 374
lobsters 10 14 10 13 10 24 10 23
mail 10 159 10 155 10 233 10 233
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 131 10 234 10 240
ruby-lsp 10 129 10 125 10 221 10 213
sequel 10 320 10 318 10 426 10 427
binarytrees 10 51 10 49 10 118 10 111
blurhash 10 63 10 59 10 120 10 148
erubi 10 84 10 95 10 104 10 123
etanni 10 60 10 63 10 69 10 75
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 38
lee 10 11 10 12 10 19 10 21
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 204 10 421 10 512
nqueens 10 113 10 117 10 113 10 434
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 180 10 181 10 572 10 682
protoboeuf-encode 10 125 10 162 10 283 10 639
rack 10 459 10 477 10 821 10 947
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 33
tinygql 10 24 10 23 10 51 10 52
30k_ifelse 10 10 10 10 10 71 10 69
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 246 10 261 10 1108 10 1212
fib 10 102 10 100 10 616 10 618
getivar 10 214 10 239 10 1253 10 1746
keyword_args 10 90 10 90 10 729 10 947
object-new 10 220 10 213 10 308 10 276
respond_to 10 91 10 94 10 1785 10 2096
ruby-xor 10 30 10 31 10 92 10 175
setivar 10 348 10 362 10 2319 10 4826
setivar_object 10 216 10 226 10 536 10 600
setivar_young 10 216 10 224 10 528 10 595
str_concat 10 319 10 356 10 658 10 734
throw 10 972 10 896 10 1342 10 1185

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) 1354020 1207366 214 2169 0 0% 0 0 81.252082
chunky-png (click) 290453 276216 83 1059 1 0% 0 0 36.223083
erubi-rails (click) 1629591 1346214 274 2920 6 0% 0 0 101.274228
hexapdf (click) 1248344 1084703 506 11816 40 0% 0 0 411.659324
liquid-c (click) 463626 372254 119 1768 5 0% 0 0 57.459249
liquid-compile (click) 389039 354027 151 2082 2 0% 0 0 73.128691
liquid-render (click) 555306 493249 136 2326 8 0% 0 0 77.060904
lobsters (click) 7525270 6359636 3082 49749 82 0% 0 0 2249.051238
mail (click) 707826 657277 347 5554 14 0% 0 0 187.942423
psych-load (click) 236126 202495 61 594 3 0% 0 0 21.510239
railsbench (click) 2887305 2396485 1636 15998 57 0% 0 0 590.097577
rubocop (click) 5432190 4530297 2893 50939 114 0% 4 0 1929.558409
ruby-lsp (click) 786906 734599 309 4745 24 0% 0 0 160.217798
sequel (click) 432175 375277 16 117 0 0% 0 0 5.265033
binarytrees (click) 8404 7594 9 66 0 0% 0 0 3.215231
blurhash (click) 50094 43901 30 453 0 0% 0 0 17.680344
erubi (click) 211699 178536 10 112 0 0% 0 0 4.62022
etanni (click) 28405 26890 11 91 0 0% 0 0 3.480662
fannkuchredux (click) 23706 31291 4 252 0 0% 0 0 9.725304
fluentd (click) 338257 314767 4 28 0 0% 0 0 1.353022
graphql (click) 380754 352292 66 650 0 0% 0 0 22.932694
graphql-native (click) 349131 325813 41 273 0 0% 0 0 10.072616
lee (click) 228373 183216 34 531 0 0% 0 0 19.545909
matmul (click) 7957 8968 7 82 0 0% 0 0 3.178639
nbody (click) 15014 19017 10 191 0 0% 0 0 6.181643
nqueens (click) 23822 23823 9 279 0 0% 0 0 10.322647
optcarrot (click) 309010 266612 187 4398 34 0% 0 0 118.998438
protoboeuf (click) 139992 122036 16 1364 0 0% 0 0 49.254362
protoboeuf-encode (click) 212046 174944 18 1189 0 0% 0 0 36.627736
rack (click) 214833 193961 37 413 0 0% 0 0 13.417986
ruby-json (click) 19008 16632 7 164 0 0% 0 0 5.419201
rubykon (click) 128223 123238 136 1480 3 0% 0 0 48.497072
sudoku (click) 45292 24766 7 516 0 0% 0 0 19.077747
tinygql (click) 240845 177454 58 735 5 0% 0 0 24.135424
30k_ifelse (click) 5134313 4729205 9258 50774 0 0% 0 0 1926.340582
30k_methods (click) 2016559 1591611 5777 19335 0 0% 0 0 533.33935
cfunc_itself (click) 7172 6017 8 66 0 0% 0 0 2.336817
fib (click) 4609 4792 7 45 0 0% 0 0 1.842839
getivar (click) 5575 6644 7 70 0 0% 0 0 2.321445
keyword_args (click) 8042 6744 9 68 0 0% 0 0 2.64546
object-new (click) 4039 4024 6 41 0 0% 0 0 1.992408
respond_to (click) 7910 8158 8 81 0 0% 0 0 2.819033
ruby-xor (click) 5219 5772 4 58 0 0% 0 0 1.942821
setivar (click) 4726 5320 7 50 0 0% 0 0 1.884102
setivar_object (click) 5109 5228 7 50 0 0% 0 0 1.949703
setivar_young (click) 5819 5950 8 58 0 0% 0 0 2.190355
str_concat (click) 7415 7947 10 81 0 0% 0 0 3.246338
throw (click) 7538 6222 9 65 0 0% 0 0 2.631136

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.