YJIT Benchmarks

Details for Benchmarks at 2024-12-16 03:49:20 UTC

YJIT metrics from the yjit-bench suite using Ruby fdd7b36996.

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 91.1% faster than CRuby 3.4.0dev
  • 6.2% faster than YJIT 3.3.6
On railsbench it is
  • 94.9% faster than CRuby 3.4.0dev
  • 4.4% faster than YJIT 3.3.6
x86_64 runtime: 3 hours, 51 minutes
aarch64 runtime: 3 hours, 20 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 82 50 156 50 164
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 422 5 429 50 591 50 625
liquid-compile 5 407 5 410 50 541 50 588
liquid-render 5 169 5 170 50 404 50 420
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 193 50 238 50 253
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 157 5 155 50 251 50 266
ruby-lsp 5 158 5 155 50 249 50 275
sequel 5 430 5 415 50 597 50 582
binarytrees 5 84 5 82 50 144 50 140
blurhash 5 82 5 83 50 127 50 145
erubi 5 75 5 149 50 98 50 140
etanni 5 91 5 99 50 54 50 70
fannkuchredux 5 52 5 53 50 101 50 101
fluentd 5 64 5 65 50 26 50 23
graphql 5 84 5 85 50 57 50 57
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 97
nbody 5 248 5 247 50 577 50 705
nqueens 5 120 5 119 50 75 50 562
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 175 50 619 50 723
protoboeuf-encode 5 180 5 195 50 326 50 827
rack 5 569 5 624 50 951 50 1063
ruby-json 5 83 5 84 50 49 50 52
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 164 50 161
tinygql 5 35 5 36 50 22 50 27
30k_ifelse 5 28 5 28 50 215 50 207
30k_methods 5 38 5 38 50 483 50 473
cfunc_itself 5 346 5 334 50 1046 50 1145
fib 5 127 5 127 50 909 50 937
getivar 5 207 5 223 50 2257 50 2632
keyword_args 5 106 5 106 50 959 50 1134
object-new 5 321 5 311 50 404 50 384
respond_to 5 133 5 138 50 3262 50 3982
ruby-xor 5 242 5 248 50 804 50 1383
setivar 5 358 5 358 50 3125 50 5710
setivar_object 5 374 5 341 50 746 50 849
setivar_young 5 371 5 344 50 769 50 852
str_concat 5 401 5 392 50 971 50 1203
throw 5 1259 5 1237 50 1740 50 1602

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) 1423758 1199648 210 2211 0 0% 0 0 63.943187
chunky-png (click) 295138 260782 85 1127 1 0% 0 0 33.098309
erubi-rails (click) 1902686 1662065 259 2973 19 0% 0 0 80.754985
hexapdf (click) 1445971 1248407 596 13159 41 0% 0 0 379.378515
liquid-c (click) 480040 438415 115 1764 5 0% 0 0 48.847967
liquid-compile (click) 400156 369032 147 2117 2 0% 0 0 66.053535
liquid-render (click) 612956 486270 132 2329 8 0% 0 0 66.292635
lobsters (click) 8137455 6898991 3212 52711 169 0% 0 0 1773.05546
mail (click) 729836 652070 343 5321 14 0% 0 0 153.850847
psych-load (click) 238804 194385 62 620 3 0% 0 0 19.489783
railsbench (click) 3260012 2811622 1642 16225 52 0% 0 0 468.667284
rubocop (click) 5671382 4832464 2888 50604 110 0% 4 0 1570.026931
ruby-lsp (click) 826773 731979 306 4745 24 0% 0 0 133.180347
sequel (click) 453251 426998 12 105 0 0% 0 0 3.83754
binarytrees (click) 7424 6400 7 55 0 0% 0 0 2.367527
blurhash (click) 50590 43092 28 442 0 0% 0 0 14.390243
erubi (click) 229373 182200 6 100 0 0% 0 0 3.281033
etanni (click) 31129 29637 8 87 0 0% 0 0 2.988826
fannkuchredux (click) 23377 30267 4 252 0 0% 0 0 7.398537
fluentd (click) 337952 296277 8 96 0 0% 0 0 3.309692
graphql (click) 404085 345558 67 679 0 0% 0 0 21.112036
graphql-native (click) 359965 301118 38 258 0 0% 0 0 8.680065
lee (click) 280496 170138 46 749 0 0% 0 0 23.463947
loops-times (click) 7034 7662 6 74 0 0% 0 0 2.375064
matmul (click) 10988 3769 9 112 0 0% 0 0 3.58747
nbody (click) 13396 17343 7 175 0 0% 0 0 4.597517
nqueens (click) 20494 27605 6 242 0 0% 0 0 6.98537
optcarrot (click) 319427 243061 189 4402 34 0% 0 0 103.394508
protoboeuf (click) 151228 130005 13 1484 0 0% 0 0 42.282977
protoboeuf-encode (click) 221443 220595 15 1223 0 0% 0 0 31.353308
rack (click) 241266 187948 33 388 0 0% 0 0 10.314227
ruby-json (click) 25796 22844 9 181 0 0% 0 0 5.080957
rubykon (click) 134396 137392 138 1492 3 0% 0 0 42.649028
sudoku (click) 45866 41280 8 521 0 0% 0 0 15.442927
tinygql (click) 270993 234751 59 765 5 0% 0 0 21.677677
30k_ifelse (click) 5659135 5285109 9260 51671 0 0% 0 0 1418.848592
30k_methods (click) 2234900 1593140 5779 19354 0 0% 0 0 454.265141
cfunc_itself (click) 5461 4343 5 50 0 0% 0 0 1.498621
fib (click) 2930 3118 4 29 0 0% 0 0 1.075872
getivar (click) 3832 4970 4 54 0 0% 0 0 1.450072
keyword_args (click) 6651 5070 6 52 0 0% 0 0 1.751603
object-new (click) 2264 2350 3 25 0 0% 0 0 0.918996
respond_to (click) 6199 6484 5 65 0 0% 0 0 1.892699
ruby-xor (click) 5662 6266 5 67 0 0% 0 0 1.959495
setivar (click) 2983 3646 4 34 0 0% 0 0 1.151926
setivar_object (click) 3512 3794 4 36 0 0% 0 0 1.234182
setivar_young (click) 4222 4516 5 44 0 0% 0 0 1.441498
str_concat (click) 5800 6273 7 65 0 0% 0 0 2.07524
throw (click) 6179 4548 6 49 0 0% 0 0 1.683115

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.