YJIT Benchmarks

Details for Benchmarks at 2024-09-19 23:04:53 UTC

YJIT metrics from the yjit-bench suite using Ruby 2230ac4a28

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 72.6% faster than CRuby 3.4.0dev
  • 2.3% faster than YJIT 3.3.4
On railsbench it is
  • 80.6% faster than CRuby 3.4.0dev
  • 1.4% 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 58 10 145 10 146
chunky-png 10 18 10 17 10 36 10 39
erubi-rails 10 10 10 10 10 23 10 22
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 348 10 347 10 501 10 508
liquid-compile 10 345 10 357 10 497 10 503
liquid-render 10 137 10 134 10 358 10 360
lobsters 10 13 10 13 10 24 10 23
mail 10 160 10 138 10 237 10 228
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
ruby-lsp 10 127 10 131 10 213 10 218
sequel 10 325 10 316 10 434 10 438
binarytrees 10 51 10 52 10 118 10 112
blurhash 10 63 10 63 10 120 10 149
erubi 10 81 10 102 10 104 10 129
etanni 10 60 10 69 10 69 10 79
fannkuchredux 10 10 10 10 10 17 10 21
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 29 10 40 10 31 10 48
lee 10 11 10 12 10 20 10 21
matmul 10 10 10 10 10 15 10 19
nbody 10 203 10 220 10 421 10 512
nqueens 10 112 10 113 10 112 10 477
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 159 10 153 10 582 10 637
protoboeuf-encode 10 132 10 161 10 291 10 652
rack 10 464 10 490 10 838 10 910
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 35
tinygql 10 23 10 23 10 52 10 52
30k_ifelse 10 10 10 10 10 70 10 62
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 250 10 253 10 1108 10 1212
fib 10 102 10 102 10 616 10 623
getivar 10 214 10 246 10 1246 10 1754
keyword_args 10 88 10 88 10 729 10 948
object-new 10 230 10 190 10 308 10 243
respond_to 10 91 10 93 10 1785 10 2219
ruby-xor 10 30 10 30 10 92 10 175
setivar 10 348 10 402 10 2319 10 3115
setivar_object 10 216 10 225 10 536 10 484
setivar_young 10 216 10 227 10 528 10 477
str_concat 10 319 10 339 10 658 10 705
throw 10 971 10 818 10 1340 10 1032

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) 1483955 1293388 214 2301 0 0% 0 0 80.014944
chunky-png (click) 289691 237243 82 1090 1 0% 0 0 36.986198
erubi-rails (click) 1934551 1666568 245 2779 8 0% 0 0 88.849672
hexapdf (click) 1359674 1198513 508 12576 39 0% 0 0 432.361395
liquid-c (click) 498236 428208 119 1859 5 0% 0 0 60.453896
liquid-compile (click) 406920 359221 150 2188 2 0% 0 0 78.282777
liquid-render (click) 603693 521573 136 2473 12 0% 0 0 81.245601
lobsters (click) 8059543 6707428 3086 51829 181 0% 0 0 2068.989448
mail (click) 773745 662535 346 5489 16 0% 0 0 186.925314
psych-load (click) 243498 229311 60 615 3 0% 0 0 22.298319
railsbench (click) 3301291 2884733 1631 16706 41 0% 0 0 559.904759
ruby-lsp (click) 887909 724931 308 4991 26 0% 0 0 169.536312
sequel (click) 459773 402013 15 124 0 0% 0 0 5.121098
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.443355
blurhash (click) 57136 49713 29 501 0 0% 0 0 19.749189
erubi (click) 225036 193481 9 108 0 0% 0 0 4.082763
etanni (click) 28241 26371 10 86 0 0% 0 0 3.320537
fannkuchredux (click) 22572 29447 3 240 0 0% 0 0 9.198206
fluentd (click) 339909 286727 3 22 0 0% 0 0 1.001101
graphql (click) 420585 350317 65 651 0 0% 0 0 22.769938
graphql-native (click) 361671 307085 41 275 0 0% 0 0 10.297022
lee (click) 255814 230065 33 567 0 0% 0 0 20.638695
matmul (click) 7323 8338 6 76 0 0% 0 0 3.012507
nbody (click) 15428 19810 9 201 0 0% 0 0 6.24891
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.539117
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 121.240284
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 56.80875
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 38.456865
rack (click) 231175 204031 36 417 0 0% 0 0 13.139319
ruby-json (click) 18563 16002 6 158 0 0% 0 0 5.171543
rubykon (click) 140687 120490 135 1573 3 0% 0 0 52.910346
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.45278
tinygql (click) 294033 257775 57 743 5 0% 0 0 24.317465
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 1922.073622
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 545.491228
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.26548
fib (click) 4585 4605 6 42 0 0% 0 0 1.833707
getivar (click) 5037 6014 6 64 0 0% 0 0 2.066429
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.606773
object-new (click) 3469 3394 5 35 0 0% 0 0 1.563827
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.532398
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.793357
setivar (click) 4188 4690 6 44 0 0% 0 0 1.688295
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.854213
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.098534
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.190623
throw (click) 7384 5592 8 59 0 0% 0 0 2.352119

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.