YJIT Benchmarks

Details for Benchmarks at 2024-07-03 19:08:17 UTC

YJIT metrics from the yjit-bench suite using Ruby 6ac05ddb8a

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 75.6% faster than CRuby 3.4.0dev
  • the same speed as YJIT 3.3.3
On railsbench it is
  • 78.3% faster than CRuby 3.4.0dev
  • 1.2% slower than YJIT 3.3.3

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.3 warmups CRuby 3.3.3 iters CRuby 3.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.3.3 warmups YJIT 3.3.3 iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 10 51 10 47 10 115 10 120
chunky-png 10 18 10 14 10 36 10 45
erubi-rails 10 10 10 10 10 20 10 19
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 352 10 327 10 503 10 475
liquid-compile 10 346 10 326 10 490 10 481
liquid-render 10 138 10 130 10 353 10 346
lobsters 10 14 10 12 10 23 10 22
mail 10 162 10 143 10 238 10 213
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 136 10 127 10 228 10 234
ruby-lsp 10 127 10 121 10 209 10 182
sequel 10 324 10 299 10 438 10 402
binarytrees 10 51 10 46 10 117 10 104
blurhash 10 62 10 56 10 118 10 146
erubi 10 83 10 79 10 103 10 99
etanni 10 58 10 54 10 68 10 63
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 34 10 31 10 39 10 37
lee 10 11 10 10 10 19 10 19
matmul 10 10 10 10 10 15 10 18
nbody 10 210 10 202 10 385 10 500
nqueens 10 115 10 98 10 114 10 446
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 189 10 162 10 680 10 620
rack 10 465 10 440 10 805 10 834
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 32
tinygql 10 25 10 22 10 52 10 49
30k_ifelse 10 10 10 10 10 70 10 69
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 257 10 216 10 1105 10 1212
fib 10 104 10 99 10 616 10 618
getivar 10 255 10 204 10 1281 10 1333
keyword_args 10 90 10 84 10 726 10 946
respond_to 10 89 10 85 10 1781 10 2150
ruby-xor 10 31 10 25 10 100 10 147
setivar 10 424 10 398 10 2352 10 3566
setivar_object 10 264 10 249 10 653 10 571
setivar_young 10 262 10 249 10 650 10 560
str_concat 10 327 10 306 10 593 10 534
throw 10 975 10 775 10 1273 10 959

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) 1407449 1192766 214 2176 0 0% 0 0 75.76409
chunky-png (click) 337274 291861 83 1092 1 0% 0 0 35.3336
erubi-rails (click) 1689120 1429598 275 2928 6 0% 0 0 97.080383
hexapdf (click) 1292501 1118535 505 11705 41 0% 0 0 377.321908
liquid-c (click) 520493 461115 120 1759 5 0% 0 0 52.976448
liquid-compile (click) 442657 365744 151 2068 2 0% 0 0 69.179026
liquid-render (click) 615246 511755 137 2303 8 0% 0 0 69.989306
lobsters (click) 7493290 6382129 3082 49294 81 0% 0 0 2065.282962
mail (click) 731098 604527 346 4932 14 0% 0 0 158.153068
psych-load (click) 295266 246350 61 594 3 0% 0 0 20.184379
railsbench (click) 2939241 2455797 1637 15959 57 0% 0 0 554.554002
rubocop (click) 5447640 4591737 2893 50473 110 0% 4 0 1775.439394
ruby-lsp (click) 834408 749972 310 4514 24 0% 0 0 145.188806
sequel (click) 493372 437459 16 117 0 0% 0 0 4.716746
binarytrees (click) 8756 7777 10 70 0 0% 0 0 3.293543
blurhash (click) 50429 43324 31 457 0 0% 0 0 16.794067
erubi (click) 272299 225132 10 112 0 0% 0 0 4.318384
etanni (click) 31820 30338 12 96 0 0% 0 0 3.455392
fannkuchredux (click) 21198 26809 5 228 0 0% 0 0 7.825482
fluentd (click) 377092 312366 4 28 0 0% 0 0 1.264902
graphql (click) 432983 347971 66 648 0 0% 0 0 21.858584
graphql-native (click) 404902 324769 41 273 0 0% 0 0 10.543852
lee (click) 297071 259116 34 542 0 0% 0 0 18.660229
matmul (click) 8315 983 8 86 0 0% 0 0 3.083764
nbody (click) 14798 17933 11 185 0 0% 0 0 5.562885
nqueens (click) 22145 28339 10 257 0 0% 0 0 8.918045
optcarrot (click) 304463 277860 188 4310 34 0% 0 0 108.166857
protoboeuf (click) 140419 133760 17 1349 0 0% 0 0 43.453843
rack (click) 277831 222799 37 408 0 0% 0 0 12.11653
ruby-json (click) 31806 21355 8 167 0 0% 0 0 5.160849
rubykon (click) 128025 95997 137 1482 3 0% 0 0 45.06231
sudoku (click) 41994 57542 8 473 0 0% 0 0 15.909127
tinygql (click) 309991 269801 58 734 5 0% 0 0 23.10559
30k_ifelse (click) 5134674 4729436 9259 50778 0 0% 0 0 1891.003941
30k_methods (click) 2016920 1591842 5778 19339 0 0% 0 0 532.789602
cfunc_itself (click) 7534 6180 9 70 0 0% 0 0 2.393755
fib (click) 4970 5003 8 49 0 0% 0 0 2.031771
getivar (click) 5963 6375 8 74 0 0% 0 0 2.333498
keyword_args (click) 8409 6912 10 72 0 0% 0 0 2.624234
respond_to (click) 8277 8274 9 85 0 0% 0 0 2.816124
ruby-xor (click) 5565 5673 5 62 0 0% 0 0 1.894551
setivar (click) 5102 5375 8 54 0 0% 0 0 1.907399
setivar_object (click) 5470 5395 8 54 0 0% 0 0 2.007264
setivar_young (click) 6182 6093 9 62 0 0% 0 0 2.238552
str_concat (click) 7774 7946 11 85 0 0% 0 0 3.100056
throw (click) 7895 6377 10 69 0 0% 0 0 2.748019

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.