YJIT Benchmarks

Details for Benchmarks at 2024-08-21 19:08:31 UTC

YJIT metrics from the yjit-bench suite using Ruby 53e3795379

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 74.5% faster than CRuby 3.4.0dev
  • 2.8% faster than YJIT 3.3.4
On railsbench it is
  • 79.1% 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 48 10 117 10 117
chunky-png 10 18 10 17 10 36 10 40
erubi-rails 10 10 10 10 10 21 10 19
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 340 10 350 10 500 10 511
liquid-compile 10 345 10 348 10 524 10 528
liquid-render 10 138 10 133 10 355 10 370
lobsters 10 14 10 13 10 24 10 23
mail 10 159 10 157 10 232 10 229
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 131 10 235 10 241
ruby-lsp 10 128 10 126 10 217 10 215
sequel 10 318 10 315 10 427 10 427
binarytrees 10 51 10 49 10 118 10 110
blurhash 10 62 10 63 10 120 10 148
erubi 10 79 10 94 10 106 10 123
etanni 10 59 10 62 10 69 10 73
fannkuchredux 10 10 10 10 10 17 10 17
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 29 10 31 10 33 10 35
lee 10 11 10 11 10 19 10 21
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 212 10 421 10 520
nqueens 10 113 10 115 10 113 10 451
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 182 10 183 10 572 10 681
protoboeuf-encode 10 125 10 159 10 284 10 639
rack 10 453 10 472 10 841 10 891
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 52 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 247 10 264 10 1108 10 1211
fib 10 102 10 104 10 616 10 618
getivar 10 213 10 228 10 1251 10 1736
keyword_args 10 88 10 85 10 730 10 947
object-new 10 229 10 217 10 308 10 278
respond_to 10 91 10 90 10 1785 10 2089
ruby-xor 10 30 10 30 10 92 10 171
setivar 10 348 10 409 10 2320 10 4872
setivar_object 10 216 10 242 10 536 10 557
setivar_young 10 216 10 244 10 528 10 603
str_concat 10 319 10 328 10 658 10 736
throw 10 968 10 889 10 1343 10 1160

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) 1363795 1190463 214 2169 0 0% 0 0 81.752517
chunky-png (click) 281938 235016 83 1054 1 0% 0 0 36.170077
erubi-rails (click) 1644844 1441119 275 2912 6 0% 0 0 102.446
hexapdf (click) 1264410 1109061 505 11811 39 0% 0 0 415.089868
liquid-c (click) 476182 444259 119 1765 5 0% 0 0 58.613265
liquid-compile (click) 389068 338752 151 2064 2 0% 0 0 71.617274
liquid-render (click) 564476 500258 136 2324 8 0% 0 0 77.916544
lobsters (click) 7520026 6230161 3081 49766 81 0% 0 0 2258.301395
mail (click) 738799 701115 347 5554 14 0% 0 0 189.622163
psych-load (click) 248545 198477 61 592 3 0% 0 0 21.253214
railsbench (click) 2901695 2490182 1637 15971 57 0% 0 0 595.409421
rubocop (click) 5442997 4595752 2894 50963 114 0% 4 0 1945.368192
ruby-lsp (click) 788538 698245 309 4745 24 0% 0 0 161.319351
sequel (click) 433761 355193 16 117 0 0% 0 0 5.282859
binarytrees (click) 8404 7594 9 66 0 0% 0 0 2.994728
blurhash (click) 50094 43901 30 453 0 0% 0 0 17.814656
erubi (click) 217306 201396 10 112 0 0% 0 0 4.392141
etanni (click) 28405 26890 11 91 0 0% 0 0 3.546018
fannkuchredux (click) 23706 31291 4 252 0 0% 0 0 9.828164
fluentd (click) 317486 280637 4 28 0 0% 0 0 1.346999
graphql (click) 391317 362805 66 650 0 0% 0 0 23.30847
graphql-native (click) 358445 327228 41 273 0 0% 0 0 10.385856
lee (click) 244367 212664 34 531 0 0% 0 0 19.593567
matmul (click) 7957 8968 7 82 0 0% 0 0 3.206428
nbody (click) 15014 19017 10 191 0 0% 0 0 6.213446
nqueens (click) 23822 23823 9 279 0 0% 0 0 10.45376
optcarrot (click) 309010 266612 187 4398 34 0% 0 0 120.186194
protoboeuf (click) 139992 122036 16 1364 0 0% 0 0 49.415116
protoboeuf-encode (click) 212046 174944 18 1189 0 0% 0 0 36.900705
rack (click) 237559 206394 37 408 0 0% 0 0 13.161982
ruby-json (click) 24237 21549 7 166 0 0% 0 0 5.544191
rubykon (click) 128589 131709 136 1482 3 0% 0 0 48.791702
sudoku (click) 45292 24766 7 516 0 0% 0 0 19.263344
tinygql (click) 240152 217854 58 735 5 0% 0 0 24.236541
30k_ifelse (click) 5134313 4729205 9258 50774 0 0% 0 0 1936.889145
30k_methods (click) 2016559 1591611 5777 19335 0 0% 0 0 538.682339
cfunc_itself (click) 7172 6017 8 66 0 0% 0 0 2.36829
fib (click) 4609 4792 7 45 0 0% 0 0 1.852854
getivar (click) 5575 6644 7 70 0 0% 0 0 2.337817
keyword_args (click) 8042 6744 9 68 0 0% 0 0 2.649708
object-new (click) 4039 4024 6 41 0 0% 0 0 1.988131
respond_to (click) 7910 8158 8 81 0 0% 0 0 2.845514
ruby-xor (click) 5219 5772 4 58 0 0% 0 0 1.981492
setivar (click) 4726 5320 7 50 0 0% 0 0 1.88646
setivar_object (click) 5109 5228 7 50 0 0% 0 0 1.970732
setivar_young (click) 5819 5950 8 58 0 0% 0 0 2.205451
str_concat (click) 7415 7947 10 81 0 0% 0 0 3.196804
throw (click) 7538 6222 9 65 0 0% 0 0 2.684533

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.