YJIT Benchmarks

Details for Benchmarks at 2024-08-14 06:08:31 UTC

YJIT metrics from the yjit-bench suite using Ruby f2f177edb3

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 75.0% faster than CRuby 3.4.0dev
  • 3.2% faster than YJIT 3.3.4
On railsbench it is
  • 77.9% 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 49 10 118 10 115
chunky-png 10 18 10 18 10 35 10 40
erubi-rails 10 10 10 10 10 21 10 21
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 347 10 353 10 488 10 517
liquid-compile 10 347 10 344 10 529 10 507
liquid-render 10 138 10 135 10 355 10 372
lobsters 10 14 10 13 10 24 10 23
mail 10 159 10 158 10 238 10 230
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 234 10 241
ruby-lsp 10 127 10 125 10 212 10 228
sequel 10 319 10 314 10 429 10 431
binarytrees 10 51 10 52 10 118 10 117
blurhash 10 62 10 63 10 120 10 148
erubi 10 84 10 95 10 105 10 124
etanni 10 60 10 65 10 69 10 75
fannkuchredux 10 10 10 10 10 17 10 18
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 30 10 31 10 34 10 31
lee 10 11 10 12 10 20 10 22
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 233 10 421 10 520
nqueens 10 111 10 113 10 113 10 450
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 180 10 185 10 572 10 745
protoboeuf-encode 10 125 10 164 10 283 10 641
rack 10 458 10 485 10 834 10 911
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 32
tinygql 10 23 10 23 10 51 10 52
30k_ifelse 10 10 10 10 10 71 10 69
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 250 10 256 10 1108 10 1212
fib 10 100 10 92 10 616 10 618
getivar 10 214 10 243 10 1254 10 1751
keyword_args 10 86 10 87 10 729 10 947
object-new 10 228 10 190 10 309 10 243
respond_to 10 90 10 88 10 1786 10 2096
ruby-xor 10 30 10 31 10 92 10 160
setivar 10 347 10 419 10 2319 10 4882
setivar_object 10 216 10 243 10 536 10 476
setivar_young 10 216 10 245 10 528 10 471
str_concat 10 318 10 355 10 658 10 693
throw 10 973 10 836 10 1341 10 1054

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) 1362934 1215452 214 2169 0 0% 0 0 81.398837
chunky-png (click) 276850 214507 83 1054 1 0% 0 0 35.940524
erubi-rails (click) 1640944 1356204 274 2920 6 0% 0 0 101.809942
hexapdf (click) 1255289 1044174 505 11811 35 0% 0 0 412.889518
liquid-c (click) 454895 367844 119 1768 5 0% 0 0 58.248415
liquid-compile (click) 388026 339043 151 2082 2 0% 0 0 73.334074
liquid-render (click) 557786 487954 136 2325 8 0% 0 0 77.430932
lobsters (click) 7526958 6330833 3082 49852 81 0% 0 0 2254.689188
mail (click) 739956 685571 347 5554 14 0% 0 0 188.055015
psych-load (click) 236592 203022 61 594 3 0% 0 0 21.408038
railsbench (click) 2894530 2500640 1636 15976 57 0% 0 0 596.228227
rubocop (click) 5437911 4616389 2894 50963 114 0% 4 0 1936.646489
ruby-lsp (click) 787422 729770 309 4745 24 0% 0 0 161.076992
sequel (click) 429222 375880 16 116 0 0% 0 0 5.074121
binarytrees (click) 8404 7594 9 66 0 0% 0 0 2.996193
blurhash (click) 50094 43901 30 453 0 0% 0 0 17.807997
erubi (click) 215936 174977 10 112 0 0% 0 0 4.472312
etanni (click) 28405 26890 11 91 0 0% 0 0 3.54932
fannkuchredux (click) 23706 31291 4 252 0 0% 0 0 9.664867
fluentd (click) 327074 287827 4 28 0 0% 0 0 1.335303
graphql (click) 389047 336898 66 650 0 0% 0 0 23.293694
graphql-native (click) 361439 329233 41 273 0 0% 0 0 10.217817
lee (click) 251804 195538 34 531 0 0% 0 0 19.508035
matmul (click) 7957 8968 7 82 0 0% 0 0 3.208254
nbody (click) 15014 19017 10 191 0 0% 0 0 6.190818
nqueens (click) 23822 23823 9 279 0 0% 0 0 10.419973
optcarrot (click) 309010 266612 187 4398 34 0% 0 0 119.455336
protoboeuf (click) 139992 122036 16 1364 0 0% 0 0 48.858854
protoboeuf-encode (click) 212046 174944 18 1189 0 0% 0 0 36.728672
rack (click) 239834 215815 37 408 0 0% 0 0 13.078564
ruby-json (click) 22702 19678 7 164 0 0% 0 0 5.425481
rubykon (click) 128589 131709 136 1482 3 0% 0 0 48.712266
sudoku (click) 45292 24766 7 516 0 0% 0 0 19.270665
tinygql (click) 253978 236950 58 735 5 0% 0 0 24.489917
30k_ifelse (click) 5134313 4729205 9258 50774 0 0% 0 0 1934.301002
30k_methods (click) 2016559 1591611 5777 19335 0 0% 0 0 538.960736
cfunc_itself (click) 7172 6017 8 66 0 0% 0 0 2.366279
fib (click) 4609 4792 7 45 0 0% 0 0 1.865186
getivar (click) 5575 6644 7 70 0 0% 0 0 2.353615
keyword_args (click) 8042 6744 9 68 0 0% 0 0 2.623981
object-new (click) 4039 4024 6 41 0 0% 0 0 1.954798
respond_to (click) 7910 8158 8 81 0 0% 0 0 2.864055
ruby-xor (click) 5219 5772 4 58 0 0% 0 0 1.942172
setivar (click) 4726 5320 7 50 0 0% 0 0 1.893452
setivar_object (click) 5109 5228 7 50 0 0% 0 0 1.955761
setivar_young (click) 5819 5950 8 58 0 0% 0 0 2.190398
str_concat (click) 7415 7947 10 81 0 0% 0 0 3.18319
throw (click) 7538 6222 9 65 0 0% 0 0 2.711951

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.