YJIT Benchmarks

Details for Benchmarks at 2024-08-18 06:08:35 UTC

YJIT metrics from the yjit-bench suite using Ruby 4dbf386ca2

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 74.1% faster than CRuby 3.4.0dev
  • 2.1% faster than YJIT 3.3.4
On railsbench it is
  • 80.8% 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 49 10 49 10 117 10 117
chunky-png 10 18 10 18 10 36 10 40
erubi-rails 10 10 10 10 10 21 10 20
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 347 10 347 10 495 10 509
liquid-compile 10 344 10 340 10 499 10 496
liquid-render 10 136 10 137 10 354 10 372
lobsters 10 14 10 13 10 24 10 23
mail 10 159 10 155 10 239 10 226
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 130 10 235 10 238
ruby-lsp 10 128 10 125 10 216 10 213
sequel 10 324 10 314 10 438 10 428
binarytrees 10 51 10 50 10 118 10 111
blurhash 10 62 10 64 10 120 10 148
erubi 10 84 10 94 10 105 10 121
etanni 10 60 10 63 10 69 10 74
fannkuchredux 10 10 10 10 10 17 10 20
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 30 10 30 10 32 10 34
lee 10 11 10 11 10 19 10 20
matmul 10 10 10 10 10 15 10 19
nbody 10 203 10 231 10 421 10 511
nqueens 10 112 10 114 10 112 10 441
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 181 10 183 10 572 10 681
protoboeuf-encode 10 125 10 159 10 283 10 638
rack 10 456 10 473 10 836 10 915
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 22 10 51 10 52
30k_ifelse 10 10 10 10 10 70 10 69
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 250 10 247 10 1108 10 1210
fib 10 102 10 98 10 616 10 618
getivar 10 214 10 228 10 1252 10 1736
keyword_args 10 86 10 86 10 730 10 946
object-new 10 228 10 209 10 308 10 269
respond_to 10 91 10 91 10 1785 10 2087
ruby-xor 10 30 10 31 10 92 10 173
setivar 10 348 10 403 10 2319 10 4869
setivar_object 10 216 10 244 10 536 10 607
setivar_young 10 216 10 248 10 528 10 603
str_concat 10 319 10 338 10 658 10 722
throw 10 970 10 884 10 1339 10 1170

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) 1355974 1151570 214 2169 0 0% 0 0 81.460128
chunky-png (click) 269933 242220 83 1054 1 0% 0 0 36.099955
erubi-rails (click) 1642208 1396796 274 2920 6 0% 0 0 101.99234
hexapdf (click) 1249140 1077162 505 11812 40 0% 0 0 410.347844
liquid-c (click) 459666 379830 119 1768 5 0% 0 0 58.129447
liquid-compile (click) 387116 353381 151 2080 2 0% 0 0 73.21266
liquid-render (click) 561422 498331 136 2323 8 0% 0 0 77.291158
lobsters (click) 7564026 6341388 3081 49719 81 0% 0 0 2254.791554
mail (click) 709767 666673 347 5554 14 0% 0 0 189.106305
psych-load (click) 250820 224451 61 592 3 0% 0 0 21.182638
railsbench (click) 2888479 2527389 1636 15969 57 0% 0 0 590.410021
rubocop (click) 5436072 4599861 2894 50962 114 0% 4 0 1933.856081
ruby-lsp (click) 807350 692944 309 4745 24 0% 0 0 160.754803
sequel (click) 436908 368364 16 117 0 0% 0 0 5.200248
binarytrees (click) 8404 7594 9 66 0 0% 0 0 2.990542
blurhash (click) 50094 43901 30 453 0 0% 0 0 17.741148
erubi (click) 218756 201874 10 112 0 0% 0 0 4.450784
etanni (click) 24958 23898 11 92 0 0% 0 0 3.562286
fannkuchredux (click) 23706 31291 4 252 0 0% 0 0 9.710048
fluentd (click) 325189 254168 4 28 0 0% 0 0 1.332747
graphql (click) 380598 351907 66 650 0 0% 0 0 23.063975
graphql-native (click) 352009 327853 41 273 0 0% 0 0 10.541582
lee (click) 241993 226631 34 531 0 0% 0 0 19.610662
matmul (click) 7957 8968 7 82 0 0% 0 0 3.249008
nbody (click) 15014 19017 10 191 0 0% 0 0 6.212359
nqueens (click) 23822 23823 9 279 0 0% 0 0 10.459966
optcarrot (click) 309010 266612 187 4398 34 0% 0 0 119.427699
protoboeuf (click) 139992 122036 16 1364 0 0% 0 0 49.013347
protoboeuf-encode (click) 212046 158560 18 1189 0 0% 0 0 36.819535
rack (click) 232154 207910 37 408 0 0% 0 0 13.132274
ruby-json (click) 24237 21549 7 166 0 0% 0 0 5.606965
rubykon (click) 130437 109178 136 1500 3 0% 0 0 49.286831
sudoku (click) 45292 24766 7 516 0 0% 0 0 19.359079
tinygql (click) 250638 216788 58 735 5 0% 0 0 24.541627
30k_ifelse (click) 5134313 4729205 9258 50774 0 0% 0 0 1941.547455
30k_methods (click) 2016559 1591611 5777 19335 0 0% 0 0 536.526297
cfunc_itself (click) 7172 6017 8 66 0 0% 0 0 2.375341
fib (click) 4609 4792 7 45 0 0% 0 0 1.862186
getivar (click) 5575 6644 7 70 0 0% 0 0 2.309935
keyword_args (click) 8042 6744 9 68 0 0% 0 0 2.662696
object-new (click) 4039 4024 6 41 0 0% 0 0 2.067418
respond_to (click) 7910 8158 8 81 0 0% 0 0 2.853009
ruby-xor (click) 5219 5772 4 58 0 0% 0 0 1.975745
setivar (click) 4726 5320 7 50 0 0% 0 0 1.869953
setivar_object (click) 5109 5228 7 50 0 0% 0 0 1.95515
setivar_young (click) 5819 5950 8 58 0 0% 0 0 2.216565
str_concat (click) 7415 7947 10 81 0 0% 0 0 3.243316
throw (click) 7538 6222 9 65 0 0% 0 0 2.654253

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.