YJIT Benchmarks

Details for Benchmarks at 2024-12-18 03:47:37 UTC

YJIT metrics from the yjit-bench suite using Ruby 6336431a64.

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 90.9% faster than CRuby 3.4.0dev
  • 5.2% faster than YJIT 3.3.6
On railsbench it is
  • 97.3% faster than CRuby 3.4.0dev
  • 5.8% faster than YJIT 3.3.6
x86_64 runtime: 3 hours, 51 minutes
aarch64 runtime: 3 hours, 17 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 83 5 81 50 156 50 164
chunky-png 5 32 5 32 50 15 50 33
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 406 5 423 50 587 50 627
liquid-compile 5 408 5 408 50 539 50 560
liquid-render 5 169 5 166 50 407 50 432
lobsters 5 20 5 20 50 10 50 10
mail 5 188 5 189 50 238 50 241
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 155 50 250 50 269
ruby-lsp 5 151 5 157 50 260 50 255
sequel 5 430 5 418 50 595 50 587
binarytrees 5 84 5 82 50 144 50 142
blurhash 5 82 5 83 50 127 50 145
erubi 5 75 5 150 50 89 50 149
etanni 5 91 5 100 50 54 50 71
fannkuchredux 5 52 5 54 50 101 50 102
fluentd 5 63 5 61 50 26 50 30
graphql 5 85 5 85 50 57 50 56
graphql-native 5 40 5 53 50 10 50 15
lee 5 23 5 22 50 10 50 10
loops-times 5 24 5 23 50 48 50 65
matmul 5 50 5 51 50 85 50 98
nbody 5 248 5 252 50 577 50 706
nqueens 5 120 5 120 50 75 50 566
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 174 50 619 50 727
protoboeuf-encode 5 180 5 199 50 326 50 787
rack 5 574 5 622 50 945 50 1043
ruby-json 5 83 5 85 50 50 50 51
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 164 50 161
tinygql 5 36 5 38 50 23 50 29
30k_ifelse 5 28 5 28 50 215 50 206
30k_methods 5 39 5 38 50 480 50 475
cfunc_itself 5 345 5 337 50 1046 50 1145
fib 5 127 5 128 50 910 50 937
getivar 5 207 5 214 50 2257 50 2617
keyword_args 5 106 5 105 50 959 50 1134
object-new 5 321 5 310 50 404 50 378
respond_to 5 133 5 138 50 3260 50 3984
ruby-xor 5 241 5 248 50 803 50 1248
setivar 5 358 5 357 50 3126 50 5707
setivar_object 5 374 5 338 50 749 50 830
setivar_young 5 373 5 344 50 769 50 852
str_concat 5 402 5 394 50 968 50 1210
throw 5 1261 5 1232 50 1744 50 1673

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) 1408316 1158233 210 2207 0 0% 0 0 64.638352
chunky-png (click) 297906 262335 85 1127 1 0% 0 0 33.321955
erubi-rails (click) 1910056 1675433 259 2996 19 0% 0 0 81.628364
hexapdf (click) 1467403 1285095 596 13146 41 0% 0 0 379.511354
liquid-c (click) 480625 424113 115 1750 5 0% 0 0 48.417191
liquid-compile (click) 404822 359908 147 2090 2 0% 0 0 64.843399
liquid-render (click) 603316 519098 132 2315 8 0% 0 0 65.153213
lobsters (click) 8107417 6755343 3212 52467 169 0% 0 0 1791.8842
mail (click) 733936 663642 343 5321 14 0% 0 0 154.108183
psych-load (click) 247039 208755 62 620 3 0% 0 0 19.252174
railsbench (click) 3228163 2793223 1642 16197 52 0% 0 0 469.918839
rubocop (click) 5668813 4835957 2888 50557 110 0% 4 0 1477.70178
ruby-lsp (click) 812865 728422 306 4732 24 0% 0 0 133.85611
sequel (click) 475812 408899 12 97 0 0% 0 0 3.334794
binarytrees (click) 7424 6400 7 55 0 0% 0 0 2.39812
blurhash (click) 50449 51120 28 441 0 0% 0 0 14.332246
erubi (click) 231025 201824 6 100 0 0% 0 0 3.270542
etanni (click) 31129 29637 8 87 0 0% 0 0 2.962037
fannkuchredux (click) 23377 30267 4 252 0 0% 0 0 7.4352
fluentd (click) 337054 319958 8 96 0 0% 0 0 3.298702
graphql (click) 399464 363362 67 679 0 0% 0 0 21.066867
graphql-native (click) 365279 336561 38 258 0 0% 0 0 8.72556
lee (click) 278928 275677 46 749 0 0% 0 0 23.405776
loops-times (click) 7034 7662 6 74 0 0% 0 0 2.384468
matmul (click) 10988 3769 9 112 0 0% 0 0 3.665712
nbody (click) 13396 17343 7 175 0 0% 0 0 4.604838
nqueens (click) 20494 27605 6 242 0 0% 0 0 7.075806
optcarrot (click) 319427 243061 189 4402 34 0% 0 0 100.612643
protoboeuf (click) 151228 130005 13 1484 0 0% 0 0 42.308672
protoboeuf-encode (click) 221443 220595 15 1223 0 0% 0 0 31.466842
rack (click) 240971 195884 33 388 0 0% 0 0 10.39276
ruby-json (click) 25911 22980 9 181 0 0% 0 0 5.128765
rubykon (click) 134396 137392 138 1492 3 0% 0 0 42.956616
sudoku (click) 45866 41280 8 521 0 0% 0 0 15.353126
tinygql (click) 258936 220504 59 765 5 0% 0 0 21.696974
30k_ifelse (click) 5659135 5285109 9260 51671 0 0% 0 0 1415.863498
30k_methods (click) 2234900 1593140 5779 19354 0 0% 0 0 451.416452
cfunc_itself (click) 5461 4343 5 50 0 0% 0 0 1.469332
fib (click) 2930 3118 4 29 0 0% 0 0 1.174187
getivar (click) 3832 4970 4 54 0 0% 0 0 1.482802
keyword_args (click) 6651 5070 6 52 0 0% 0 0 1.788401
object-new (click) 2264 2350 3 25 0 0% 0 0 0.898004
respond_to (click) 6199 6484 5 65 0 0% 0 0 1.925856
ruby-xor (click) 5662 6266 5 67 0 0% 0 0 2.009599
setivar (click) 2983 3646 4 34 0 0% 0 0 1.138216
setivar_object (click) 3512 3794 4 36 0 0% 0 0 1.264498
setivar_young (click) 4222 4516 5 44 0 0% 0 0 1.433823
str_concat (click) 5800 6273 7 65 0 0% 0 0 2.092906
throw (click) 6179 4548 6 49 0 0% 0 0 1.699837

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.