YJIT Benchmarks

Details for Benchmarks at 2024-11-12 03:43:47 UTC

YJIT metrics from the yjit-bench suite using Ruby 8655cbec39

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 85.4% faster than CRuby 3.4.0dev
  • 2.9% faster than YJIT 3.3.4
On railsbench it is
  • 96.6% faster than CRuby 3.4.0dev
  • 1.8% 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 5 83 5 82 50 158 50 158
chunky-png 5 31 5 32 50 15 50 20
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 424 5 426 50 573 50 622
liquid-compile 5 410 5 404 50 545 50 553
liquid-render 5 167 5 171 50 401 50 434
lobsters 5 20 5 19 50 10 50 10
mail 5 188 5 192 50 236 50 238
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 154 50 251 50 261
ruby-lsp 5 155 5 159 50 245 50 244
sequel 5 428 5 416 50 592 50 554
binarytrees 5 84 5 83 50 146 50 147
blurhash 5 82 5 81 50 127 50 144
erubi 5 113 5 144 50 97 50 123
etanni 5 90 5 96 50 52 50 62
fannkuchredux 5 52 5 55 50 101 50 106
fluentd 5 61 5 65 50 23 50 23
graphql 5 85 5 83 50 57 50 55
graphql-native 5 41 5 52 50 10 50 14
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 49 50 88 50 98
nbody 5 248 5 248 50 594 50 707
nqueens 5 119 5 118 50 74 50 562
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 172 5 172 50 615 50 678
protoboeuf-encode 5 178 5 200 50 327 50 804
rack 5 575 5 635 50 962 50 1080
ruby-json 5 85 5 81 50 51 50 48
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 163 50 161
tinygql 5 36 5 36 50 24 50 25
30k_ifelse 5 28 5 28 50 214 50 193
30k_methods 5 38 5 38 50 483 50 466
cfunc_itself 5 339 5 336 50 1045 50 1136
fib 5 127 5 126 50 900 50 962
getivar 5 208 5 218 50 2271 50 2628
keyword_args 5 105 5 104 50 959 50 1231
object-new 5 322 5 318 50 406 50 389
respond_to 5 137 5 142 50 3254 50 4033
ruby-xor 5 242 5 248 50 803 50 1378
setivar 5 364 5 358 50 3124 50 5709
setivar_object 5 374 5 341 50 772 50 841
setivar_young 5 373 5 343 50 772 50 846
str_concat 5 397 5 403 50 988 50 1193
throw 5 1268 5 1321 50 1720 50 1759

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) 1453462 1253684 213 2296 0 0% 0 0 66.340415
chunky-png (click) 302882 243195 86 1133 1 0% 0 0 33.101095
erubi-rails (click) 1914813 1673983 250 2846 8 0% 0 0 76.922586
hexapdf (click) 1497529 1254093 597 13852 35 0% 0 0 393.604277
liquid-c (click) 493513 416422 119 1852 5 0% 0 0 51.82083
liquid-compile (click) 441825 356813 150 2187 2 0% 0 0 66.364572
liquid-render (click) 632509 549901 136 2466 12 0% 0 0 69.212746
lobsters (click) 8333228 6962056 3215 54397 181 0% 0 0 1855.13972
mail (click) 776060 697553 346 5490 16 0% 0 0 156.465951
psych-load (click) 250185 213404 64 654 3 0% 0 0 20.294996
railsbench (click) 3324768 2789258 1633 16670 41 0% 0 0 505.506181
rubocop (click) 5836150 4938758 2891 52192 110 0% 4 0 1513.528856
ruby-lsp (click) 845479 777882 308 4990 26 0% 0 0 141.243031
sequel (click) 450656 338008 15 114 0 0% 0 0 4.08784
binarytrees (click) 9627 8546 8 75 0 0% 0 0 2.964877
blurhash (click) 57136 49713 29 501 0 0% 0 0 16.10868
erubi (click) 224131 194762 9 108 0 0% 0 0 3.547061
etanni (click) 27632 25826 9 85 0 0% 0 0 2.868267
fannkuchredux (click) 24038 30826 5 257 0 0% 0 0 7.682818
fluentd (click) 376420 320649 10 109 0 0% 0 0 3.778159
graphql (click) 386238 339732 69 695 0 0% 0 0 20.747324
graphql-native (click) 368622 291358 40 270 0 0% 0 0 8.643211
lee (click) 284682 251578 48 803 0 0% 0 0 24.631073
matmul (click) 11838 4563 10 119 0 0% 0 0 3.919285
nbody (click) 14884 19325 8 196 0 0% 0 0 5.12006
nqueens (click) 21155 28164 7 247 0 0% 0 0 7.18243
optcarrot (click) 327944 312320 190 4549 34 0% 0 0 106.228951
protoboeuf (click) 163392 155036 14 1610 0 0% 0 0 46.02125
protoboeuf-encode (click) 234584 230620 16 1249 0 0% 0 0 31.961974
rack (click) 226909 194374 36 417 0 0% 0 0 10.943354
ruby-json (click) 27045 23855 10 189 0 0% 0 0 5.428151
rubykon (click) 140693 120664 138 1568 3 0% 0 0 44.881258
sudoku (click) 48090 43120 9 536 0 0% 0 0 15.783243
tinygql (click) 277452 228682 61 787 5 0% 0 0 22.297956
30k_ifelse (click) 6315665 5791705 9261 56473 0 0% 0 0 1572.971161
30k_methods (click) 2235566 1593704 5780 19359 0 0% 0 0 452.763578
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 1.997948
fib (click) 4041 4120 5 37 0 0% 0 0 1.450048
getivar (click) 5037 6014 6 64 0 0% 0 0 1.911277
keyword_args (click) 7637 6022 7 60 0 0% 0 0 2.112758
object-new (click) 3469 3394 5 35 0 0% 0 0 1.384149
respond_to (click) 9322 2039 6 95 0 0% 0 0 2.755404
ruby-xor (click) 6437 6880 6 72 0 0% 0 0 2.225035
setivar (click) 4188 4690 6 44 0 0% 0 0 1.571902
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.708324
setivar_young (click) 5427 5560 7 54 0 0% 0 0 1.904461
str_concat (click) 7646 7893 9 81 0 0% 0 0 2.684057
throw (click) 7384 5592 8 59 0 0% 0 0 2.096525

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.