YJIT Benchmarks

Details for Benchmarks at 2024-12-05 03:48:57 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 91.5% faster than CRuby 3.4.0dev
  • 5.8% faster than YJIT 3.3.6
On railsbench it is
  • 91.8% 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, 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 81 5 83 50 156 50 161
chunky-png 5 31 5 32 50 16 50 35
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 407 5 419 50 591 50 629
liquid-compile 5 428 5 408 50 543 50 583
liquid-render 5 173 5 168 50 405 50 422
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 186 50 251 50 251
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 153 50 251 50 263
ruby-lsp 5 155 5 157 50 236 50 262
sequel 5 417 5 420 50 580 50 593
binarytrees 5 84 5 82 50 144 50 144
blurhash 5 82 5 83 50 127 50 145
erubi 5 76 5 148 50 65 50 147
etanni 5 91 5 99 50 54 50 71
fannkuchredux 5 52 5 55 50 101 50 111
fluentd 5 63 5 63 50 26 50 30
graphql 5 85 5 86 50 57 50 57
graphql-native 5 40 5 52 50 10 50 14
lee 5 22 5 22 50 10 50 10
loops-times 5 24 5 24 50 48 50 64
matmul 5 51 5 52 50 84 50 98
nbody 5 249 5 253 50 577 50 717
nqueens 5 120 5 120 50 75 50 560
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 179 5 173 50 620 50 740
protoboeuf-encode 5 180 5 197 50 326 50 828
rack 5 575 5 629 50 950 50 1033
ruby-json 5 83 5 84 50 50 50 49
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 164 50 162
tinygql 5 36 5 38 50 23 50 29
30k_ifelse 5 28 5 28 50 215 50 193
30k_methods 5 38 5 38 50 483 50 475
cfunc_itself 5 341 5 336 50 1046 50 1135
fib 5 120 5 127 50 900 50 963
getivar 5 207 5 216 50 2266 50 2621
keyword_args 5 105 5 95 50 959 50 1231
object-new 5 321 5 311 50 403 50 380
respond_to 5 133 5 139 50 3255 50 4033
ruby-xor 5 241 5 250 50 803 50 1382
setivar 5 358 5 357 50 3125 50 5705
setivar_object 5 374 5 341 50 781 50 849
setivar_young 5 373 5 344 50 766 50 847
str_concat 5 402 5 396 50 966 50 1218
throw 5 1258 5 1297 50 1742 50 1710

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) 1494764 1257589 213 2351 0 0% 0 0 67.731844
chunky-png (click) 324839 298937 88 1224 17 1% 0 0 36.601198
erubi-rails (click) 1976103 1695920 262 3092 19 0% 0 0 83.811643
hexapdf (click) 1515453 1212459 599 13981 175 1% 0 0 398.739039
liquid-c (click) 521157 482481 118 1846 5 0% 0 0 52.451907
liquid-compile (click) 411721 365893 150 2203 2 0% 0 0 68.674037
liquid-render (click) 638169 556037 135 2468 12 0% 0 0 70.14694
lobsters (click) 8427635 7037416 3215 54973 189 0% 0 0 1866.936083
mail (click) 787178 673595 347 5588 57 1% 0 0 160.026614
psych-load (click) 264606 216743 65 661 17 2% 0 0 20.568343
railsbench (click) 3358415 2881007 1645 17047 52 0% 0 0 491.653453
rubocop (click) 5873161 5064936 2891 52425 110 0% 4 0 1521.01365
ruby-lsp (click) 892772 787660 309 5004 26 0% 0 0 142.472695
sequel (click) 454877 426859 16 136 54 39% 0 0 5.797758
binarytrees (click) 14303 12795 14 125 0 0% 1 0 4.45661
blurhash (click) 61812 53991 35 551 1 0% 1 0 17.589895
erubi (click) 262029 230174 8 113 0 0% 0 0 3.841837
etanni (click) 32243 30528 9 94 0 0% 0 0 3.211013
fannkuchredux (click) 28719 35080 11 307 0 0% 1 0 9.178995
fluentd (click) 365021 280089 10 109 0 0% 0 0 3.848029
graphql (click) 441724 397514 69 695 0 0% 0 0 21.71666
graphql-native (click) 404002 348134 40 270 0 0% 0 0 9.014409
lee (click) 303128 261056 49 846 17 2% 0 0 26.174729
loops-times (click) 12905 12894 13 133 1 0% 1 0 4.195678
matmul (click) 16519 8883 16 169 4 2% 1 0 5.516175
nbody (click) 19555 23574 14 246 0 0% 1 0 6.613232
nqueens (click) 25836 32550 13 297 4 1% 1 0 8.739463
optcarrot (click) 331857 315992 195 4591 38 0% 1 0 104.350786
protoboeuf (click) 167305 158566 19 1652 0 0% 1 0 47.098924
protoboeuf-encode (click) 238492 234145 21 1291 0 0% 1 0 33.596712
rack (click) 257972 213426 37 424 16 3% 0 0 11.224124
ruby-json (click) 27045 23855 10 189 0 0% 0 0 5.45541
rubykon (click) 146625 126486 144 1630 7 0% 1 0 46.670538
sudoku (click) 51960 39259 14 580 7 1% 1 0 17.26118
tinygql (click) 306790 270610 62 795 20 2% 0 0 22.692028
30k_ifelse (click) 6316839 5792957 9263 56487 0 0% 1 0 1549.937203
30k_methods (click) 2240242 1597953 5786 19409 0 0% 1 0 454.383989
cfunc_itself (click) 11593 9808 13 112 0 0% 1 0 3.478116
fib (click) 8722 8374 11 87 0 0% 1 0 2.950962
getivar (click) 9718 10268 12 114 0 0% 1 0 3.423418
keyword_args (click) 12318 10276 13 110 0 0% 1 0 3.584419
object-new (click) 8145 7709 11 85 1 1% 1 0 2.878065
respond_to (click) 13998 6288 12 145 0 0% 1 0 4.318216
ruby-xor (click) 11004 11151 12 122 2 1% 1 0 3.720429
setivar (click) 8869 8944 12 94 0 0% 1 0 3.065673
setivar_object (click) 9398 9092 12 96 0 0% 1 0 3.175391
setivar_young (click) 10108 9814 13 104 0 0% 1 0 3.392577
str_concat (click) 8820 9220 11 95 3 3% 0 0 3.261837
throw (click) 12065 9846 14 109 0 0% 1 0 3.726835

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.