YJIT Benchmarks

Details for Benchmarks at 2024-11-08 03:44:20 UTC

YJIT metrics from the yjit-bench suite using Ruby ed24c0c84f

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 87.3% faster than CRuby 3.4.0dev
  • 4.5% faster than YJIT 3.3.4
On railsbench it is
  • 97.0% faster than CRuby 3.4.0dev
  • 3.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 83 5 83 50 157 50 161
chunky-png 5 31 5 32 50 15 50 20
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 424 50 592 50 619
liquid-compile 5 411 5 410 50 545 50 555
liquid-render 5 171 5 166 50 403 50 434
lobsters 5 20 5 20 50 10 50 10
mail 5 186 5 193 50 251 50 247
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 156 50 252 50 266
ruby-lsp 5 156 5 159 50 247 50 259
sequel 5 428 5 417 50 568 50 579
binarytrees 5 84 5 84 50 145 50 149
blurhash 5 82 5 83 50 128 50 145
erubi 5 120 5 140 50 95 50 130
etanni 5 90 5 98 50 52 50 61
fannkuchredux 5 52 5 55 50 101 50 104
fluentd 5 61 5 65 50 23 50 32
graphql 5 85 5 86 50 57 50 57
graphql-native 5 40 5 53 50 10 50 14
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 53 50 88 50 99
nbody 5 248 5 261 50 595 50 707
nqueens 5 119 5 120 50 74 50 562
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 175 50 616 50 751
protoboeuf-encode 5 178 5 195 50 327 50 782
rack 5 577 5 637 50 948 50 1082
ruby-json 5 85 5 84 50 51 50 50
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 163 50 159
tinygql 5 36 5 37 50 24 50 26
30k_ifelse 5 28 5 28 50 214 50 193
30k_methods 5 39 5 38 50 483 50 478
cfunc_itself 5 347 5 336 50 1046 50 1135
fib 5 127 5 126 50 900 50 962
getivar 5 206 5 212 50 2269 50 2610
keyword_args 5 108 5 105 50 959 50 1231
object-new 5 315 5 274 50 407 50 393
respond_to 5 137 5 138 50 3257 50 4037
ruby-xor 5 242 5 245 50 803 50 1380
setivar 5 361 5 365 50 3126 50 5718
setivar_object 5 373 5 344 50 762 50 849
setivar_young 5 371 5 346 50 771 50 846
str_concat 5 399 5 398 50 991 50 1178
throw 5 1269 5 1329 50 1726 50 1707

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) 1475991 1222420 213 2296 0 0% 0 0 66.235564
chunky-png (click) 296415 278039 86 1133 1 0% 0 0 33.860141
erubi-rails (click) 1928948 1702627 249 2839 8 0% 0 0 77.141704
hexapdf (click) 1505514 1244958 597 13853 37 0% 0 0 395.115277
liquid-c (click) 490159 430109 119 1852 5 0% 0 0 51.603814
liquid-compile (click) 430067 388149 150 2201 2 0% 0 0 66.74337
liquid-render (click) 631410 507513 136 2466 12 0% 0 0 68.419637
lobsters (click) 8320803 6889814 3215 54374 181 0% 0 0 1832.689989
mail (click) 742116 676858 346 5481 16 0% 0 0 160.389075
psych-load (click) 282574 239436 64 654 3 0% 0 0 20.628216
railsbench (click) 3306588 2822440 1633 16720 41 0% 0 0 476.49869
rubocop (click) 5822889 4985650 2891 52177 110 0% 4 0 1528.847411
ruby-lsp (click) 888122 766002 308 4990 26 0% 0 0 141.054576
sequel (click) 494243 423709 15 118 0 0% 0 0 4.456113
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.045629
blurhash (click) 57136 49713 29 501 0 0% 0 0 16.185647
erubi (click) 225033 203777 9 108 0 0% 0 0 3.599374
etanni (click) 27632 25826 9 85 0 0% 0 0 2.884559
fannkuchredux (click) 24038 30826 5 257 0 0% 0 0 7.736731
fluentd (click) 354316 302757 10 109 0 0% 0 0 3.850288
graphql (click) 393930 345797 69 695 0 0% 0 0 20.454473
graphql-native (click) 376586 314882 40 270 0 0% 0 0 8.702546
lee (click) 306591 269228 48 803 0 0% 0 0 24.528263
matmul (click) 11838 4563 10 119 0 0% 0 0 3.997768
nbody (click) 14884 19325 8 196 0 0% 0 0 5.119262
nqueens (click) 21155 28164 7 247 0 0% 0 0 7.320599
optcarrot (click) 327944 312320 190 4549 34 0% 0 0 103.534549
protoboeuf (click) 163392 155036 14 1610 0 0% 0 0 46.264773
protoboeuf-encode (click) 234584 230620 16 1249 0 0% 0 0 32.251943
rack (click) 238330 217896 36 422 0 0% 0 0 11.37732
ruby-json (click) 21296 18539 10 187 0 0% 0 0 5.365428
rubykon (click) 140297 120385 138 1566 3 0% 0 0 44.885639
sudoku (click) 48090 43120 9 536 0 0% 0 0 16.135303
tinygql (click) 271707 254314 61 787 5 0% 0 0 22.936821
30k_ifelse (click) 6315665 5791705 9261 56473 0 0% 0 0 1584.896539
30k_methods (click) 2235566 1593704 5780 19359 0 0% 0 0 457.80308
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.001148
fib (click) 4041 4120 5 37 0 0% 0 0 1.47085
getivar (click) 5037 6014 6 64 0 0% 0 0 1.917629
keyword_args (click) 7637 6022 7 60 0 0% 0 0 2.00502
object-new (click) 3469 3394 5 35 0 0% 0 0 1.383116
respond_to (click) 9322 2039 6 95 0 0% 0 0 2.776021
ruby-xor (click) 6437 6880 6 72 0 0% 0 0 2.256515
setivar (click) 4188 4690 6 44 0 0% 0 0 1.564224
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.677801
setivar_young (click) 5427 5560 7 54 0 0% 0 0 1.899688
str_concat (click) 7646 7893 9 81 0 0% 0 0 2.636855
throw (click) 7384 5592 8 59 0 0% 0 0 2.139465

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.