YJIT Benchmarks

Details for Benchmarks at 2024-09-22 03:22:20 UTC

YJIT metrics from the yjit-bench suite using Ruby 95d26ee41e

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 73.3% faster than CRuby 3.4.0dev
  • 3.3% faster than YJIT 3.3.4
On railsbench it is
  • 76.1% 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 56 10 58 10 143 10 153
chunky-png 10 18 10 17 10 36 10 39
erubi-rails 10 10 10 10 10 23 10 23
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 341 10 351 10 486 10 502
liquid-compile 10 347 10 346 10 505 10 530
liquid-render 10 138 10 133 10 354 10 362
lobsters 10 13 10 13 10 24 10 23
mail 10 159 10 160 10 233 10 232
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 134 10 234 10 239
ruby-lsp 10 129 10 128 10 213 10 212
sequel 10 319 10 317 10 438 10 435
binarytrees 10 51 10 52 10 118 10 114
blurhash 10 62 10 63 10 120 10 148
erubi 10 83 10 102 10 105 10 126
etanni 10 60 10 69 10 69 10 79
fannkuchredux 10 10 10 10 10 17 10 19
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 33 10 47
lee 10 11 10 12 10 19 10 22
matmul 10 10 10 10 10 15 10 19
nbody 10 203 10 221 10 421 10 511
nqueens 10 113 10 113 10 113 10 469
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 158 10 153 10 582 10 636
protoboeuf-encode 10 132 10 166 10 293 10 654
rack 10 454 10 492 10 822 10 913
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 24 10 51 10 52
30k_ifelse 10 10 10 10 10 71 10 62
30k_methods 10 10 10 10 10 26 10 25
cfunc_itself 10 248 10 250 10 1108 10 1212
fib 10 102 10 102 10 616 10 623
getivar 10 214 10 246 10 1252 10 1753
keyword_args 10 90 10 88 10 729 10 948
object-new 10 228 10 192 10 309 10 243
respond_to 10 91 10 92 10 1785 10 2219
ruby-xor 10 30 10 30 10 92 10 175
setivar 10 348 10 403 10 2320 10 3116
setivar_object 10 216 10 226 10 536 10 484
setivar_young 10 216 10 227 10 528 10 477
str_concat 10 320 10 339 10 657 10 709
throw 10 969 10 815 10 1341 10 1045

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) 1449062 1244006 214 2301 0 0% 0 0 80.94299
chunky-png (click) 298333 254540 82 1090 1 0% 0 0 37.199163
erubi-rails (click) 1920390 1664341 245 2807 8 0% 0 0 89.758044
hexapdf (click) 1370153 1191030 507 12573 41 0% 0 0 430.877987
liquid-c (click) 525253 459753 119 1856 5 0% 0 0 60.8912
liquid-compile (click) 411608 343387 150 2208 2 0% 0 0 78.873822
liquid-render (click) 618149 497572 136 2473 12 0% 0 0 81.586502
lobsters (click) 8056571 6759555 3087 51727 181 0% 0 0 2059.607673
mail (click) 751555 701199 346 5489 16 0% 0 0 188.013441
psych-load (click) 278374 243629 60 615 3 0% 0 0 22.478435
railsbench (click) 3333118 2806529 1631 16697 41 0% 0 0 561.296476
rubocop (click) 5807128 5118124 2892 52112 110 0% 4 0 1839.68609
ruby-lsp (click) 852610 717856 308 4992 26 0% 0 0 169.912338
sequel (click) 457660 369115 15 124 0 0% 0 0 5.271021
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.418175
blurhash (click) 57136 49713 29 501 0 0% 0 0 19.70462
erubi (click) 220973 200123 9 108 0 0% 0 0 4.110189
etanni (click) 28241 26371 10 86 0 0% 0 0 3.312471
fannkuchredux (click) 22572 29447 3 240 0 0% 0 0 9.193019
fluentd (click) 352772 306898 3 22 0 0% 0 0 0.976365
graphql (click) 420565 350184 65 651 0 0% 0 0 22.58582
graphql-native (click) 363876 315512 41 275 0 0% 0 0 10.217392
lee (click) 250915 207864 33 567 0 0% 0 0 20.63855
matmul (click) 7323 8338 6 76 0 0% 0 0 2.993688
nbody (click) 15428 19810 9 201 0 0% 0 0 6.353827
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.600906
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 121.484807
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 56.807811
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 38.448536
rack (click) 250401 230754 36 422 0 0% 0 0 13.441331
ruby-json (click) 24330 21342 6 159 0 0% 0 0 5.230822
rubykon (click) 141083 120769 135 1575 3 0% 0 0 52.738382
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.606256
tinygql (click) 261092 235903 57 746 5 0% 0 0 24.763827
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 1906.922494
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 541.885205
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.279324
fib (click) 4585 4605 6 42 0 0% 0 0 1.784061
getivar (click) 5037 6014 6 64 0 0% 0 0 2.099223
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.574583
object-new (click) 3469 3394 5 35 0 0% 0 0 1.555882
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.538483
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.805833
setivar (click) 4188 4690 6 44 0 0% 0 0 1.710567
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.864472
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.149109
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.219111
throw (click) 7384 5592 8 59 0 0% 0 0 2.315111

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.