YJIT Benchmarks

Details for Benchmarks at 2024-11-13 03:44:43 UTC

YJIT metrics from the yjit-bench suite using Ruby 8ae63ca3be

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 87.6% faster than CRuby 3.4.0dev
  • 3.9% faster than YJIT 3.3.4
On railsbench it is
  • 95.4% faster than CRuby 3.4.0dev
  • 2.2% faster than YJIT 3.3.4

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.4 warmups CRuby 3.3.4 iters CRuby 3.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.3.4 warmups YJIT 3.3.4 iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 5 82 5 82 50 152 50 158
chunky-png 5 31 5 32 50 15 50 19
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 409 5 416 50 577 50 635
liquid-compile 5 410 5 406 50 546 50 555
liquid-render 5 170 5 169 50 403 50 428
lobsters 5 20 5 20 50 10 50 10
mail 5 188 5 190 50 236 50 247
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 252 50 262
ruby-lsp 5 156 5 142 50 237 50 235
sequel 5 418 5 420 50 568 50 574
binarytrees 5 84 5 83 50 146 50 147
blurhash 5 82 5 82 50 127 50 145
erubi 5 114 5 144 50 86 50 126
etanni 5 90 5 97 50 52 50 63
fannkuchredux 5 52 5 55 50 100 50 104
fluentd 5 61 5 66 50 22 50 31
graphql 5 85 5 83 50 57 50 55
graphql-native 5 40 5 52 50 10 50 14
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 49 50 88 50 98
nbody 5 248 5 248 50 595 50 706
nqueens 5 119 5 120 50 74 50 554
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 171 50 616 50 687
protoboeuf-encode 5 178 5 202 50 327 50 804
rack 5 575 5 626 50 943 50 1081
ruby-json 5 85 5 83 50 49 50 50
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 163 50 160
tinygql 5 36 5 36 50 24 50 26
30k_ifelse 5 28 5 28 50 214 50 194
30k_methods 5 38 5 38 50 482 50 473
cfunc_itself 5 340 5 351 50 1046 50 1136
fib 5 127 5 128 50 901 50 963
getivar 5 208 5 219 50 2267 50 2625
keyword_args 5 105 5 108 50 959 50 1231
object-new 5 322 5 312 50 406 50 382
respond_to 5 137 5 140 50 3257 50 4021
ruby-xor 5 241 5 249 50 804 50 1381
setivar 5 359 5 358 50 3124 50 5713
setivar_object 5 374 5 340 50 774 50 835
setivar_young 5 371 5 343 50 772 50 844
str_concat 5 397 5 407 50 989 50 1212
throw 5 1270 5 1320 50 1725 50 1720

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) 1477045 1256024 213 2296 0 0% 0 0 66.456417
chunky-png (click) 324702 285032 86 1133 1 0% 0 0 32.898551
erubi-rails (click) 1943952 1739850 249 2877 8 0% 0 0 78.77742
hexapdf (click) 1523087 1266967 597 13853 40 0% 0 0 393.146218
liquid-c (click) 523426 458372 119 1852 5 0% 0 0 52.480416
liquid-compile (click) 441112 397205 150 2202 2 0% 0 0 66.869205
liquid-render (click) 631447 548577 136 2466 12 0% 0 0 68.958498
lobsters (click) 8329384 7093774 3215 54450 181 0% 0 0 1839.410037
mail (click) 776019 656616 346 5490 16 0% 0 0 157.5254
psych-load (click) 283615 248765 64 656 3 0% 0 0 20.350747
railsbench (click) 3295767 2830175 1633 16697 41 0% 0 0 473.666736
rubocop (click) 5832412 4901720 2891 52120 110 0% 4 0 1505.314243
ruby-lsp (click) 845597 736174 308 4986 26 0% 0 0 138.0157
sequel (click) 492692 446904 15 125 0 0% 0 0 4.68677
binarytrees (click) 9627 8546 8 75 0 0% 0 0 2.927255
blurhash (click) 57136 49713 29 501 0 0% 0 0 16.109939
erubi (click) 219916 209606 9 108 0 0% 0 0 3.611097
etanni (click) 27632 25826 9 85 0 0% 0 0 2.842504
fannkuchredux (click) 24038 30826 5 257 0 0% 0 0 7.615528
fluentd (click) 369945 298094 10 109 0 0% 0 0 3.79014
graphql (click) 418676 366072 69 695 0 0% 0 0 20.556623
graphql-native (click) 359096 316336 40 270 0 0% 0 0 8.593525
lee (click) 310098 280453 48 803 0 0% 0 0 24.646417
matmul (click) 11838 4563 10 119 0 0% 0 0 3.954561
nbody (click) 14884 19325 8 196 0 0% 0 0 5.080102
nqueens (click) 21155 28164 7 247 0 0% 0 0 7.189427
optcarrot (click) 327944 312320 190 4549 34 0% 0 0 102.856709
protoboeuf (click) 163392 155036 14 1610 0 0% 0 0 45.853064
protoboeuf-encode (click) 234584 230620 16 1249 0 0% 0 0 32.022005
rack (click) 265155 250367 36 417 0 0% 0 0 11.01452
ruby-json (click) 27045 23855 10 189 0 0% 0 0 5.298234
rubykon (click) 141232 121417 138 1575 3 0% 0 0 44.937803
sudoku (click) 48090 43120 9 536 0 0% 0 0 15.90144
tinygql (click) 262685 240566 61 787 5 0% 0 0 22.498962
30k_ifelse (click) 6315665 5791705 9261 56473 0 0% 0 0 1569.060012
30k_methods (click) 2235566 1593704 5780 19359 0 0% 0 0 448.881454
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.004445
fib (click) 4041 4120 5 37 0 0% 0 0 1.445928
getivar (click) 5037 6014 6 64 0 0% 0 0 1.895047
keyword_args (click) 7637 6022 7 60 0 0% 0 0 2.070903
object-new (click) 3469 3394 5 35 0 0% 0 0 1.279752
respond_to (click) 9322 2039 6 95 0 0% 0 0 2.764234
ruby-xor (click) 6437 6880 6 72 0 0% 0 0 2.190258
setivar (click) 4188 4690 6 44 0 0% 0 0 1.592009
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.644464
setivar_young (click) 5427 5560 7 54 0 0% 0 0 1.923159
str_concat (click) 7646 7893 9 81 0 0% 0 0 2.702256
throw (click) 7384 5592 8 59 0 0% 0 0 2.094618

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.