YJIT Benchmarks

Details for Benchmarks at 2024-09-05 04:00:21 UTC

YJIT metrics from the yjit-bench suite using Ruby 294dad22d7

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 73.4% faster than CRuby 3.4.0dev
  • 1.6% faster than YJIT 3.3.4
On railsbench it is
  • 81.8% faster than CRuby 3.4.0dev
  • the same speed as 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 10 50 10 50 10 119 10 120
chunky-png 10 18 10 17 10 35 10 41
erubi-rails 10 10 10 10 10 21 10 20
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 349 10 344 10 486 10 509
liquid-compile 10 343 10 335 10 526 10 494
liquid-render 10 137 10 135 10 353 10 364
lobsters 10 14 10 13 10 24 10 23
mail 10 162 10 158 10 232 10 231
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 132 10 235 10 237
ruby-lsp 10 131 10 115 10 215 10 184
sequel 10 322 10 317 10 430 10 436
binarytrees 10 51 10 51 10 118 10 114
blurhash 10 62 10 62 10 120 10 143
erubi 10 84 10 96 10 105 10 126
etanni 10 60 10 65 10 69 10 76
fannkuchredux 10 10 10 10 10 17 10 20
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 28 10 30 10 31 10 39
lee 10 11 10 12 10 19 10 21
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 223 10 421 10 518
nqueens 10 113 10 116 10 113 10 441
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 182 10 182 10 572 10 627
protoboeuf-encode 10 124 10 162 10 283 10 642
rack 10 458 10 485 10 839 10 937
ruby-json 10 10 10 10 10 10 10 10
rubykon 10 10 10 10 10 10 10 10
sudoku 10 10 10 10 10 28 10 33
tinygql 10 23 10 22 10 52 10 51
30k_ifelse 10 10 10 10 10 70 10 62
30k_methods 10 10 10 10 10 26 10 25
cfunc_itself 10 246 10 259 10 1108 10 1213
fib 10 102 10 101 10 616 10 623
getivar 10 214 10 254 10 1247 10 1760
keyword_args 10 90 10 88 10 729 10 948
object-new 10 230 10 189 10 308 10 237
respond_to 10 89 10 93 10 1785 10 2220
ruby-xor 10 30 10 31 10 92 10 181
setivar 10 348 10 420 10 2320 10 3125
setivar_object 10 216 10 256 10 536 10 627
setivar_young 10 216 10 256 10 528 10 623
str_concat 10 320 10 353 10 658 10 752
throw 10 972 10 829 10 1346 10 1087

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) 1463005 1281056 214 2299 0 0% 0 0 87.14891
chunky-png (click) 300389 247572 82 1090 1 0% 0 0 37.925545
erubi-rails (click) 1737115 1477997 274 3003 6 0% 0 0 105.109471
hexapdf (click) 1355087 1138736 507 12609 34 0% 0 0 446.24127
liquid-c (click) 489295 389885 118 1858 5 0% 0 0 62.101764
liquid-compile (click) 403949 342103 150 2211 2 0% 0 0 80.429324
liquid-render (click) 610160 530477 135 2472 12 0% 0 0 83.778412
lobsters (click) 8196032 6931722 3078 51542 86 0% 0 0 2374.813125
mail (click) 746970 664104 346 5481 16 0% 0 0 189.273676
psych-load (click) 239408 219699 60 613 3 0% 0 0 22.545931
railsbench (click) 3122392 2564345 1636 16749 57 0% 0 0 629.951051
rubocop (click) 5820041 4932526 2892 52191 110 0% 4 0 2020.061807
ruby-lsp (click) 846709 731217 308 4986 26 0% 0 0 170.810389
sequel (click) 469504 395890 15 122 0 0% 0 0 5.54461
binarytrees (click) 9721 8668 8 76 0 0% 0 0 3.532311
blurhash (click) 57136 49713 29 501 0 0% 0 0 19.965054
erubi (click) 214184 180715 9 108 0 0% 0 0 4.261042
etanni (click) 28250 26371 10 86 0 0% 0 0 3.295057
fannkuchredux (click) 22545 29447 3 240 0 0% 0 0 9.283547
fluentd (click) 347018 293386 3 22 0 0% 0 0 1.1477
graphql (click) 399339 348493 65 649 0 0% 0 0 23.136019
graphql-native (click) 384975 320421 40 270 0 0% 0 0 10.112063
lee (click) 270002 242476 33 567 0 0% 0 0 20.7798
matmul (click) 7323 8338 6 76 0 0% 0 0 2.915035
nbody (click) 15399 19810 9 201 0 0% 0 0 6.438014
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.39951
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 123.630227
protoboeuf (click) 147776 155834 15 1438 0 0% 0 0 52.027387
protoboeuf-encode (click) 221137 218623 17 1204 0 0% 0 0 37.438425
rack (click) 231462 229050 36 422 0 0% 0 0 13.809277
ruby-json (click) 24342 21342 6 160 0 0% 0 0 5.19903
rubykon (click) 140687 120490 135 1573 3 0% 0 0 52.732787
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.790431
tinygql (click) 261041 237106 57 743 5 0% 0 0 24.797673
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 2241.358494
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 543.833906
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.25339
fib (click) 4585 4605 6 42 0 0% 0 0 1.80929
getivar (click) 5037 6014 6 64 0 0% 0 0 2.147317
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.644522
object-new (click) 3469 3394 5 35 0 0% 0 0 1.918925
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.566867
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.766676
setivar (click) 4188 4690 6 44 0 0% 0 0 1.776971
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.815162
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.067091
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.155632
throw (click) 7384 5592 8 59 0 0% 0 0 2.415461

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.