YJIT Benchmarks

Details for Benchmarks at 2024-10-01 04:00:18 UTC

YJIT metrics from the yjit-bench suite using Ruby 522614a377

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 76.1% faster than CRuby 3.4.0dev
  • 4.0% faster than YJIT 3.3.4
On railsbench it is
  • 83.4% faster than CRuby 3.4.0dev
  • 1.1% 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 56 10 59 10 146 10 152
chunky-png 10 18 10 17 10 35 10 39
erubi-rails 10 10 10 10 10 22 10 23
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 349 10 352 10 498 10 516
liquid-compile 10 345 10 347 10 514 10 511
liquid-render 10 138 10 132 10 358 10 368
lobsters 10 13 10 13 10 24 10 23
mail 10 161 10 145 10 233 10 234
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 236 10 241
ruby-lsp 10 130 10 131 10 217 10 234
sequel 10 323 10 323 10 433 10 445
binarytrees 10 50 10 50 10 118 10 113
blurhash 10 63 10 62 10 120 10 147
erubi 10 79 10 95 10 105 10 121
etanni 10 59 10 65 10 69 10 76
fannkuchredux 10 59 10 58 10 122 10 135
fluentd 10 38 10 37 10 42 10 46
graphql 10 62 10 61 10 75 10 76
graphql-native 10 29 10 41 10 32 10 46
lee 10 11 10 12 10 20 10 21
matmul 10 38 10 37 10 72 10 87
nbody 10 203 10 200 10 421 10 522
nqueens 10 113 10 117 10 113 10 477
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 158 10 159 10 582 10 651
protoboeuf-encode 10 132 10 166 10 295 10 656
rack 10 456 10 487 10 821 10 906
ruby-json 10 64 10 65 10 76 10 77
rubykon 10 13 10 13 10 38 10 39
sudoku 10 48 10 48 10 139 10 169
tinygql 10 23 10 23 10 51 10 53
30k_ifelse 10 26 10 26 10 230 10 207
30k_methods 10 32 10 32 10 343 10 340
cfunc_itself 10 248 10 263 10 1107 10 1211
fib 10 102 10 104 10 616 10 623
getivar 10 214 10 234 10 1248 10 1747
keyword_args 10 90 10 89 10 730 10 947
object-new 10 226 10 194 10 308 10 240
respond_to 10 91 10 93 10 1785 10 2218
ruby-xor 10 186 10 189 10 496 10 912
setivar 10 348 10 410 10 2319 10 3119
setivar_object 10 216 10 237 10 536 10 578
setivar_young 10 216 10 239 10 528 10 580
str_concat 10 319 10 347 10 658 10 718
throw 10 955 10 831 10 1341 10 1030

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) 1442307 1232795 214 2301 0 0% 0 0 74.932269
chunky-png (click) 294063 242029 82 1090 1 0% 0 0 34.936942
erubi-rails (click) 1923337 1652759 245 2828 8 0% 0 0 84.911039
hexapdf (click) 1353857 1152873 507 12565 38 0% 0 0 392.641168
liquid-c (click) 490014 422853 119 1859 5 0% 0 0 56.184833
liquid-compile (click) 412898 356523 150 2198 2 0% 0 0 73.38337
liquid-render (click) 635219 486352 136 2473 12 0% 0 0 75.026062
lobsters (click) 8053406 6730246 3086 51860 182 0% 0 0 1889.720702
mail (click) 746676 647614 346 5481 16 0% 0 0 174.092319
psych-load (click) 246654 214357 60 615 3 0% 0 0 21.059904
railsbench (click) 3307958 2759860 1631 16685 41 0% 0 0 522.386965
rubocop (click) 5807589 4947051 2892 52127 110 0% 4 0 1665.461118
ruby-lsp (click) 886574 748115 308 4991 26 0% 0 0 154.076959
sequel (click) 462424 418532 15 125 0 0% 0 0 5.191258
binarytrees (click) 9721 8668 8 76 0 0% 0 0 3.302171
blurhash (click) 57136 49713 29 501 0 0% 0 0 18.450679
erubi (click) 223654 184036 9 108 0 0% 0 0 4.02489
etanni (click) 24711 23355 10 87 0 0% 0 0 3.226902
fannkuchredux (click) 24582 31311 6 262 0 0% 0 0 8.87009
fluentd (click) 348395 287111 11 114 0 0% 0 0 4.702711
graphql (click) 398931 309167 70 700 0 0% 0 0 23.462021
graphql-native (click) 364007 315666 41 275 0 0% 0 0 9.76778
lee (click) 245297 212446 33 567 0 0% 0 0 19.39168
matmul (click) 7323 8338 6 76 0 0% 0 0 2.865207
nbody (click) 15428 19810 9 201 0 0% 0 0 6.030888
nqueens (click) 21699 28649 8 252 0 0% 0 0 8.583176
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 112.735565
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 52.83045
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 36.366985
rack (click) 240372 213037 36 417 0 0% 0 0 12.312736
ruby-json (click) 21877 19055 11 192 0 0% 0 0 6.19789
rubykon (click) 135726 115935 132 1521 3 0% 0 0 47.897176
sudoku (click) 44908 40454 6 507 0 0% 0 0 17.223021
tinygql (click) 270298 237767 57 743 5 0% 0 0 23.617893
30k_ifelse (click) 6316209 5792190 9262 56478 0 0% 0 0 1813.960135
30k_methods (click) 2236110 1594189 5781 19364 0 0% 0 0 524.394442
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.224497
fib (click) 4585 4605 6 42 0 0% 0 0 1.800694
getivar (click) 5037 6014 6 64 0 0% 0 0 2.011222
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.552148
object-new (click) 3469 3394 5 35 0 0% 0 0 1.587315
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.391708
ruby-xor (click) 6981 7365 7 77 0 0% 0 0 2.78574
setivar (click) 4188 4690 6 44 0 0% 0 0 1.719121
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.825058
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.082918
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.224406
throw (click) 7384 5592 8 59 0 0% 0 0 2.295342

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.