YJIT Benchmarks

Details for Benchmarks at 2024-12-22 03:45:06 UTC

YJIT metrics from the yjit-bench suite using Ruby 9e3e1c7fc9.

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 88.3% faster than CRuby 3.4.0dev
  • 5.0% faster than YJIT 3.3.6
On railsbench it is
  • 89.5% faster than CRuby 3.4.0dev
  • the same speed as YJIT 3.3.6
x86_64 runtime: 3 hours, 51 minutes
aarch64 runtime: 3 hours, 18 minutes

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.6 warmups CRuby 3.3.6 iters CRuby 3.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.3.6 warmups YJIT 3.3.6 iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 5 82 5 83 50 154 50 165
chunky-png 5 31 5 32 50 15 50 34
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 405 5 425 50 562 50 608
liquid-compile 5 405 5 407 50 539 50 553
liquid-render 5 172 5 169 50 404 50 432
lobsters 5 20 5 20 50 10 50 10
mail 5 188 5 194 50 250 50 224
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 157 5 154 50 251 50 265
ruby-lsp 5 158 5 160 50 244 50 275
sequel 5 423 5 415 50 593 50 587
binarytrees 5 84 5 82 50 144 50 140
blurhash 5 82 5 83 50 127 50 145
erubi 5 119 5 148 50 98 50 148
etanni 5 91 5 99 50 54 50 72
fannkuchredux 5 52 5 55 50 101 50 105
fluentd 5 63 5 63 50 24 50 29
graphql 5 85 5 87 50 57 50 55
graphql-native 5 40 5 52 50 10 50 15
lee 5 23 5 23 50 10 50 10
loops-times 5 24 5 23 50 48 50 64
matmul 5 51 5 51 50 85 50 93
nbody 5 248 5 258 50 577 50 706
nqueens 5 120 5 120 50 75 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 179 5 175 50 620 50 728
protoboeuf-encode 5 180 5 198 50 327 50 813
rack 5 573 5 607 50 926 50 1050
ruby-json 5 83 5 84 50 49 50 51
rubykon 5 20 5 21 50 10 50 10
sudoku 5 48 5 48 50 164 50 160
tinygql 5 36 5 36 50 22 50 28
30k_ifelse 5 28 5 28 50 214 50 206
30k_methods 5 38 5 38 50 483 50 468
cfunc_itself 5 346 5 328 50 1046 50 1145
fib 5 127 5 126 50 909 50 937
getivar 5 207 5 221 50 2258 50 2635
keyword_args 5 106 5 104 50 959 50 1134
object-new 5 321 5 309 50 405 50 376
respond_to 5 133 5 136 50 3260 50 3976
ruby-xor 5 241 5 242 50 803 50 1378
setivar 5 356 5 361 50 3125 50 5708
setivar_object 5 374 5 338 50 747 50 841
setivar_young 5 373 5 351 50 770 50 851
str_concat 5 398 5 393 50 969 50 1203
throw 5 1263 5 1281 50 1746 50 1698

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) 1446524 1205278 210 2207 0 0% 0 0 68.127925
chunky-png (click) 324808 277618 85 1132 1 0% 0 0 33.319185
erubi-rails (click) 1913630 1652155 259 2971 19 0% 0 0 81.257994
hexapdf (click) 1466990 1244156 597 13149 41 0% 0 0 381.538909
liquid-c (click) 504537 445322 115 1750 5 0% 0 0 48.718356
liquid-compile (click) 430008 376668 147 2084 2 0% 0 0 63.948735
liquid-render (click) 609003 515067 132 2315 8 0% 0 0 64.825384
lobsters (click) 8099337 6766138 3213 52404 169 0% 0 0 1809.712493
mail (click) 761680 638065 343 5321 14 0% 0 0 154.526861
psych-load (click) 249101 215622 62 620 3 0% 0 0 19.432791
railsbench (click) 3242314 2779939 1642 16209 52 0% 0 0 465.728322
rubocop (click) 5690706 4987469 2888 50522 110 0% 4 0 1496.870983
ruby-lsp (click) 812069 723699 306 4733 24 0% 0 0 134.522535
sequel (click) 451638 424819 12 97 0 0% 0 0 3.808807
binarytrees (click) 7424 6400 7 55 0 0% 0 0 2.395367
blurhash (click) 50449 51120 28 441 0 0% 0 0 14.351448
erubi (click) 254456 205851 6 100 0 0% 0 0 3.341277
etanni (click) 31129 29637 8 87 0 0% 0 0 2.996625
fannkuchredux (click) 23377 30267 4 252 0 0% 0 0 7.456724
fluentd (click) 340151 289645 8 96 0 0% 0 0 3.341742
graphql (click) 428044 399172 67 679 0 0% 0 0 21.226549
graphql-native (click) 394644 353879 38 258 0 0% 0 0 8.836333
lee (click) 299831 261115 46 749 0 0% 0 0 23.55253
loops-times (click) 7034 7662 6 74 0 0% 0 0 2.365204
matmul (click) 10988 3769 9 112 0 0% 0 0 3.645006
nbody (click) 13396 17343 7 175 0 0% 0 0 4.588922
nqueens (click) 20494 27605 6 242 0 0% 0 0 7.081685
optcarrot (click) 319427 243061 189 4402 34 0% 0 0 100.645159
protoboeuf (click) 151228 130005 13 1484 0 0% 0 0 42.331327
protoboeuf-encode (click) 221443 220595 15 1223 0 0% 0 0 31.368313
rack (click) 264402 224507 33 388 0 0% 0 0 10.202596
ruby-json (click) 25796 22844 9 181 0 0% 0 0 5.227933
rubykon (click) 134396 137392 138 1492 3 0% 0 0 42.999535
sudoku (click) 45866 41280 8 521 0 0% 0 0 15.432462
tinygql (click) 269998 242203 59 765 5 0% 0 0 21.807447
30k_ifelse (click) 5659135 5285109 9260 51671 0 0% 0 0 1414.446081
30k_methods (click) 2234900 1593140 5779 19354 0 0% 0 0 451.020834
cfunc_itself (click) 5461 4343 5 50 0 0% 0 0 1.516084
fib (click) 2930 3118 4 29 0 0% 0 0 1.127291
getivar (click) 3832 4970 4 54 0 0% 0 0 1.50397
keyword_args (click) 6651 5070 6 52 0 0% 0 0 1.780506
object-new (click) 2264 2350 3 25 0 0% 0 0 0.916918
respond_to (click) 6199 6484 5 65 0 0% 0 0 1.905309
ruby-xor (click) 5662 6266 5 67 0 0% 0 0 1.992851
setivar (click) 2983 3646 4 34 0 0% 0 0 1.147575
setivar_object (click) 3512 3794 4 36 0 0% 0 0 1.246008
setivar_young (click) 4222 4516 5 44 0 0% 0 0 1.435039
str_concat (click) 5800 6273 7 65 0 0% 0 0 2.115172
throw (click) 6179 4548 6 49 0 0% 0 0 1.718111

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.