YJIT Benchmarks

Details for Benchmarks at 2024-12-09 03:49:21 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 88.4% faster than CRuby 3.4.0dev
  • 6.3% faster than YJIT 3.3.6
On railsbench it is
  • 91.3% faster than CRuby 3.4.0dev
  • 3.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 84 50 156 50 165
chunky-png 5 32 5 32 50 16 50 34
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 413 5 420 50 570 50 613
liquid-compile 5 409 5 413 50 540 50 558
liquid-render 5 171 5 170 50 407 50 424
lobsters 5 20 5 20 50 10 50 10
mail 5 189 5 192 50 237 50 253
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 251 50 263
ruby-lsp 5 156 5 161 50 233 50 262
sequel 5 416 5 419 50 572 50 588
binarytrees 5 84 5 82 50 144 50 142
blurhash 5 82 5 83 50 127 50 145
erubi 5 117 5 146 50 93 50 145
etanni 5 91 5 99 50 54 50 69
fannkuchredux 5 52 5 55 50 101 50 104
fluentd 5 63 5 60 50 25 50 31
graphql 5 85 5 86 50 57 50 57
graphql-native 5 40 5 51 50 10 50 15
lee 5 22 5 23 50 10 50 10
loops-times 5 24 5 23 50 48 50 64
matmul 5 51 5 54 50 84 50 96
nbody 5 248 5 253 50 577 50 717
nqueens 5 120 5 120 50 75 50 565
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 179 5 175 50 620 50 741
protoboeuf-encode 5 179 5 199 50 327 50 823
rack 5 575 5 634 50 947 50 1046
ruby-json 5 83 5 84 50 50 50 51
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 164 50 162
tinygql 5 36 5 37 50 22 50 30
30k_ifelse 5 28 5 28 50 215 50 194
30k_methods 5 39 5 39 50 483 50 477
cfunc_itself 5 342 5 333 50 1046 50 1135
fib 5 127 5 127 50 899 50 962
getivar 5 207 5 216 50 2266 50 2626
keyword_args 5 105 5 105 50 959 50 1231
object-new 5 321 5 311 50 404 50 374
respond_to 5 133 5 137 50 3255 50 4029
ruby-xor 5 242 5 245 50 804 50 1386
setivar 5 358 5 357 50 3128 50 5706
setivar_object 5 373 5 341 50 782 50 841
setivar_young 5 373 5 344 50 766 50 850
str_concat 5 402 5 398 50 967 50 1212
throw 5 1261 5 1265 50 1739 50 1650

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) 1491404 1255057 211 2342 0 0% 0 0 67.536385
chunky-png (click) 308272 297171 85 1207 1 0% 0 0 36.227045
erubi-rails (click) 1966737 1719728 259 3025 19 0% 0 0 82.273051
hexapdf (click) 1534241 1305773 596 13966 41 0% 0 0 400.627602
liquid-c (click) 499336 471016 115 1832 5 0% 0 0 51.050037
liquid-compile (click) 421326 331764 147 2179 2 0% 0 0 66.952514
liquid-render (click) 604325 499284 132 2454 12 0% 0 0 69.68009
lobsters (click) 8408688 7145589 3212 54789 189 0% 0 0 1878.192882
mail (click) 755670 710946 343 5567 16 0% 0 0 160.956191
psych-load (click) 257558 228342 62 645 3 0% 0 0 20.195203
railsbench (click) 3349952 2893098 1642 17040 52 0% 0 0 492.133505
rubocop (click) 5856872 4925457 2888 52411 110 0% 4 0 1528.963308
ruby-lsp (click) 890036 785446 306 4990 26 0% 0 0 142.436565
sequel (click) 469504 395403 12 112 0 0% 0 0 4.22707
binarytrees (click) 8966 7987 7 70 0 0% 0 0 2.834893
blurhash (click) 56475 49154 28 496 0 0% 0 0 15.958834
erubi (click) 231160 192571 6 104 0 0% 0 0 3.401432
etanni (click) 28075 26977 9 93 0 0% 0 0 3.119012
fannkuchredux (click) 23377 30267 4 252 0 0% 0 0 7.450056
fluentd (click) 350288 308475 8 100 0 0% 0 0 3.511245
graphql (click) 415528 358321 67 686 0 0% 0 0 21.274704
graphql-native (click) 379317 324545 38 261 0 0% 0 0 8.775373
lee (click) 286072 250479 46 830 0 0% 0 0 25.679865
loops-times (click) 7563 8052 6 78 0 0% 0 0 2.530762
matmul (click) 11177 4004 9 114 0 0% 0 0 3.718304
nbody (click) 14223 18766 7 191 0 0% 0 0 4.906657
nqueens (click) 20494 27605 6 242 0 0% 0 0 7.044644
optcarrot (click) 327283 311761 189 4544 34 0% 0 0 103.794684
protoboeuf (click) 162731 154477 13 1605 0 0% 0 0 45.820529
protoboeuf-encode (click) 233923 230061 15 1244 0 0% 0 0 32.078562
rack (click) 247955 203436 33 403 0 0% 0 0 10.498962
ruby-json (click) 20509 17904 9 181 0 0% 0 0 5.103128
rubykon (click) 141532 121906 138 1579 3 0% 0 0 45.357474
sudoku (click) 47391 34904 8 533 0 0% 0 0 15.909424
tinygql (click) 275040 244292 59 778 5 0% 0 0 21.676626
30k_ifelse (click) 6315004 5791146 9260 56468 0 0% 0 0 1565.135432
30k_methods (click) 2234900 1593140 5779 19354 0 0% 0 0 448.877353
cfunc_itself (click) 5707 4510 5 52 0 0% 0 0 1.549378
fib (click) 3380 3561 4 32 0 0% 0 0 1.281792
getivar (click) 3832 4970 4 54 0 0% 0 0 1.475854
keyword_args (click) 6976 5463 6 55 0 0% 0 0 1.895787
object-new (click) 2264 2350 3 25 0 0% 0 0 0.888775
respond_to (click) 8661 1480 5 90 0 0% 0 0 2.558281
ruby-xor (click) 5662 6266 5 67 0 0% 0 0 1.998218
setivar (click) 2983 3646 4 34 0 0% 0 0 1.132949
setivar_object (click) 3512 3794 4 36 0 0% 0 0 1.24863
setivar_young (click) 4222 4516 5 44 0 0% 0 0 1.466446
str_concat (click) 6441 6849 7 71 0 0% 0 0 2.213206
throw (click) 6179 4548 6 49 0 0% 0 0 1.717683

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.