YJIT Benchmarks

Details for Benchmarks at 2024-11-15 03:47:33 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 90.0% faster than CRuby 3.4.0dev
  • 4.9% faster than YJIT 3.3.4
On railsbench it is
  • 96.3% faster than CRuby 3.4.0dev
  • 2.0% 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 84 5 83 50 156 50 162
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 423 5 425 50 593 50 617
liquid-compile 5 411 5 410 50 546 50 559
liquid-render 5 168 5 170 50 403 50 420
lobsters 5 20 5 20 50 10 50 10
mail 5 188 5 193 50 251 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 248 50 262
ruby-lsp 5 158 5 139 50 242 50 235
sequel 5 428 5 422 50 583 50 589
binarytrees 5 84 5 83 50 146 50 152
blurhash 5 82 5 82 50 127 50 144
erubi 5 121 5 142 50 89 50 134
etanni 5 90 5 99 50 52 50 70
fannkuchredux 5 52 5 55 50 100 50 95
fluentd 5 61 5 62 50 22 50 28
graphql 5 85 5 84 50 56 50 56
graphql-native 5 40 5 52 50 10 50 15
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 48 50 88 50 99
nbody 5 248 5 248 50 596 50 716
nqueens 5 119 5 119 50 74 50 559
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 174 50 616 50 726
protoboeuf-encode 5 178 5 198 50 327 50 810
rack 5 581 5 633 50 956 50 1053
ruby-json 5 85 5 84 50 50 50 50
rubykon 5 20 5 21 50 10 50 10
sudoku 5 48 5 48 50 163 50 162
tinygql 5 37 5 36 50 24 50 26
30k_ifelse 5 28 5 28 50 215 50 193
30k_methods 5 39 5 38 50 479 50 475
cfunc_itself 5 340 5 338 50 1046 50 1136
fib 5 127 5 111 50 900 50 963
getivar 5 208 5 218 50 2266 50 2613
keyword_args 5 105 5 104 50 959 50 1231
object-new 5 321 5 319 50 407 50 388
respond_to 5 137 5 139 50 3256 50 4026
ruby-xor 5 241 5 249 50 804 50 1380
setivar 5 360 5 359 50 3124 50 5704
setivar_object 5 374 5 341 50 774 50 848
setivar_young 5 374 5 343 50 772 50 845
str_concat 5 397 5 384 50 987 50 1203
throw 5 1261 5 1325 50 1720 50 1734

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) 1474623 1323613 213 2351 0 0% 0 0 68.471269
chunky-png (click) 316176 264931 87 1217 1 0% 0 0 36.043959
erubi-rails (click) 1963329 1619418 263 3032 19 0% 0 0 82.793202
hexapdf (click) 1497734 1307213 599 13943 39 0% 0 0 395.439638
liquid-c (click) 488677 397264 119 1852 5 0% 0 0 51.720355
liquid-compile (click) 423176 360414 150 2211 2 0% 0 0 68.712427
liquid-render (click) 637520 547456 136 2474 12 0% 0 0 69.715475
lobsters (click) 8418353 7019022 3216 54840 188 0% 0 0 1912.686744
mail (click) 768387 654099 346 5581 16 0% 0 0 160.527996
psych-load (click) 261219 246187 64 654 3 0% 0 0 20.52509
railsbench (click) 3367077 2857047 1646 17058 52 0% 0 0 486.773734
rubocop (click) 5852348 5119965 2891 52397 110 0% 4 0 1542.155488
ruby-lsp (click) 860532 733466 309 5003 26 0% 0 0 139.910817
sequel (click) 495441 394146 15 127 0 0% 0 0 4.544899
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.050725
blurhash (click) 57136 49713 29 501 0 0% 0 0 16.098921
erubi (click) 235434 193148 8 113 0 0% 0 0 3.803135
etanni (click) 28736 27536 10 98 0 0% 0 0 3.354167
fannkuchredux (click) 24038 30826 5 257 0 0% 0 0 7.659343
fluentd (click) 355049 280469 10 109 0 0% 0 0 3.845142
graphql (click) 407756 369042 69 695 0 0% 0 0 20.36555
graphql-native (click) 382899 346644 40 270 0 0% 0 0 8.502185
lee (click) 291301 251957 48 841 0 0% 0 0 26.076066
matmul (click) 11838 4563 10 119 0 0% 0 0 3.971151
nbody (click) 14884 19325 8 196 0 0% 0 0 5.100584
nqueens (click) 21155 28164 7 247 0 0% 0 0 7.191098
optcarrot (click) 327944 312320 190 4549 34 0% 0 0 103.317375
protoboeuf (click) 163392 155036 14 1610 0 0% 0 0 45.884822
protoboeuf-encode (click) 234584 230620 16 1249 0 0% 0 0 32.118046
rack (click) 236545 219405 36 417 0 0% 0 0 11.095117
ruby-json (click) 24665 21345 10 187 0 0% 0 0 5.326687
rubykon (click) 143427 131814 139 1594 3 0% 0 0 45.559604
sudoku (click) 48052 35463 9 538 0 0% 0 0 15.91358
tinygql (click) 279271 248456 61 787 5 0% 0 0 22.18946
30k_ifelse (click) 6315665 5791705 9261 56473 0 0% 0 0 1555.791958
30k_methods (click) 2235566 1593704 5780 19359 0 0% 0 0 450.439716
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 1.976235
fib (click) 4041 4120 5 37 0 0% 0 0 1.433492
getivar (click) 5037 6014 6 64 0 0% 0 0 1.887001
keyword_args (click) 7637 6022 7 60 0 0% 0 0 2.055914
object-new (click) 3469 3394 5 35 0 0% 0 0 1.330797
respond_to (click) 9322 2039 6 95 0 0% 0 0 2.731364
ruby-xor (click) 6297 6740 6 72 0 0% 0 0 2.174957
setivar (click) 4188 4690 6 44 0 0% 0 0 1.557082
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.652634
setivar_young (click) 5427 5560 7 54 0 0% 0 0 1.87005
str_concat (click) 7646 7893 9 81 0 0% 0 0 2.727556
throw (click) 7384 5592 8 59 0 0% 0 0 2.151875

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.