YJIT Benchmarks

Details for Benchmarks at 2024-10-02 04:00:21 UTC

YJIT metrics from the yjit-bench suite using Ruby a8a921aef3

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 73.4% faster than CRuby 3.4.0dev
  • 2.7% faster than YJIT 3.3.4
On railsbench it is
  • 79.9% faster than CRuby 3.4.0dev
  • 1.7% 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 10 57 10 59 10 144 10 156
chunky-png 10 18 10 17 10 35 10 40
erubi-rails 10 10 10 10 10 22 10 23
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 343 10 351 10 488 10 517
liquid-compile 10 345 10 348 10 528 10 513
liquid-render 10 138 10 137 10 357 10 374
lobsters 10 13 10 13 10 24 10 24
mail 10 162 10 161 10 232 10 236
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 135 10 235 10 244
ruby-lsp 10 125 10 116 10 218 10 181
sequel 10 326 10 324 10 434 10 444
binarytrees 10 51 10 50 10 118 10 112
blurhash 10 62 10 61 10 120 10 146
erubi 10 83 10 99 10 101 10 114
etanni 10 60 10 69 10 69 10 80
fannkuchredux 10 58 10 58 10 123 10 136
fluentd 10 38 10 41 10 42 10 47
graphql 10 61 10 62 10 76 10 77
graphql-native 10 29 10 41 10 32 10 50
lee 10 11 10 12 10 19 10 21
matmul 10 38 10 36 10 72 10 88
nbody 10 203 10 200 10 421 10 522
nqueens 10 112 10 116 10 113 10 476
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 158 10 159 10 582 10 650
protoboeuf-encode 10 132 10 166 10 295 10 652
rack 10 453 10 492 10 828 10 927
ruby-json 10 64 10 64 10 76 10 77
rubykon 10 13 10 13 10 37 10 39
sudoku 10 48 10 47 10 139 10 171
tinygql 10 23 10 24 10 51 10 53
30k_ifelse 10 26 10 26 10 230 10 207
30k_methods 10 32 10 32 10 344 10 340
cfunc_itself 10 248 10 264 10 1108 10 1211
fib 10 102 10 104 10 616 10 623
getivar 10 214 10 234 10 1252 10 1742
keyword_args 10 90 10 88 10 730 10 946
object-new 10 230 10 176 10 308 10 235
respond_to 10 90 10 92 10 1784 10 2217
ruby-xor 10 186 10 194 10 496 10 909
setivar 10 348 10 410 10 2320 10 3121
setivar_object 10 216 10 236 10 536 10 577
setivar_young 10 216 10 239 10 528 10 579
str_concat 10 320 10 346 10 657 10 721
throw 10 970 10 832 10 1342 10 1024

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) 1444622 1286319 214 2301 0 0% 0 0 74.234922
chunky-png (click) 282975 234107 82 1095 1 0% 0 0 35.411447
erubi-rails (click) 1918277 1653825 245 2790 8 0% 0 0 83.524752
hexapdf (click) 1363068 1231208 507 12565 40 0% 0 0 392.283494
liquid-c (click) 497891 404152 119 1861 5 0% 0 0 56.554198
liquid-compile (click) 409660 347311 150 2218 2 0% 0 0 75.361123
liquid-render (click) 612857 525951 136 2473 12 0% 0 0 74.970751
lobsters (click) 8033126 6725662 3087 51782 182 0% 0 0 1884.680246
mail (click) 746492 688253 346 5481 16 0% 0 0 173.560142
psych-load (click) 250432 200054 60 615 3 0% 0 0 21.099704
railsbench (click) 3315819 2833912 1631 16671 41 0% 0 0 521.592005
rubocop (click) 5803109 4976713 2892 52164 110 0% 4 0 1678.929441
ruby-lsp (click) 850834 735006 308 4986 26 0% 0 0 155.057215
sequel (click) 471017 397226 15 114 0 0% 0 0 4.600285
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.282901
blurhash (click) 57136 49713 29 501 0 0% 0 0 18.437552
erubi (click) 215190 205894 9 108 0 0% 0 0 4.119719
etanni (click) 28241 26371 10 86 0 0% 0 0 3.176477
fannkuchredux (click) 24582 31311 6 262 0 0% 0 0 8.78939
fluentd (click) 378119 320769 11 114 0 0% 0 0 4.368677
graphql (click) 395931 343068 70 700 0 0% 0 0 23.574196
graphql-native (click) 358124 296601 41 275 0 0% 0 0 9.817675
lee (click) 284055 261961 33 567 0 0% 0 0 19.400836
matmul (click) 7323 8338 6 76 0 0% 0 0 2.887561
nbody (click) 15428 19810 9 201 0 0% 0 0 5.996333
nqueens (click) 21699 28649 8 252 0 0% 0 0 8.608475
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 112.610212
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 52.380303
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 36.230256
rack (click) 231136 212249 36 417 0 0% 0 0 12.287356
ruby-json (click) 27649 24400 11 193 0 0% 0 0 6.268367
rubykon (click) 135726 115935 132 1521 3 0% 0 0 47.681157
sudoku (click) 44908 40454 6 507 0 0% 0 0 17.070842
tinygql (click) 297692 269084 57 743 5 0% 0 0 23.258314
30k_ifelse (click) 6316209 5792190 9262 56478 0 0% 0 0 1810.06073
30k_methods (click) 2236110 1594189 5781 19364 0 0% 0 0 520.403637
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.259131
fib (click) 4585 4605 6 42 0 0% 0 0 1.812109
getivar (click) 5037 6014 6 64 0 0% 0 0 2.006416
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.538355
object-new (click) 3469 3394 5 35 0 0% 0 0 1.603418
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.366134
ruby-xor (click) 6981 7365 7 77 0 0% 0 0 2.751682
setivar (click) 4188 4690 6 44 0 0% 0 0 1.713502
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.850598
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.087231
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.205819
throw (click) 7384 5592 8 59 0 0% 0 0 2.30438

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.