YJIT Benchmarks

Details for Benchmarks at 2024-10-24 03:45:13 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 88.6% faster than CRuby 3.4.0dev
  • 2.9% faster than YJIT 3.3.4
On railsbench it is
  • 101.5% faster than CRuby 3.4.0dev
  • 3.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 5 83 5 82 50 158 50 158
chunky-png 5 31 5 31 50 15 50 21
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 419 50 569 50 622
liquid-compile 5 411 5 403 50 546 50 556
liquid-render 5 169 5 163 50 406 50 425
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 190 50 251 50 241
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 157 5 154 50 250 50 265
ruby-lsp 5 157 5 154 50 246 50 238
sequel 5 430 5 414 50 597 50 567
binarytrees 5 83 5 83 50 146 50 148
blurhash 5 82 5 84 50 128 50 144
erubi 5 121 5 142 50 87 50 36
etanni 5 90 5 97 50 52 50 60
fannkuchredux 5 52 5 54 50 101 50 108
fluentd 5 61 5 66 50 23 50 24
graphql 5 85 5 84 50 57 50 55
graphql-native 5 40 5 51 50 10 50 13
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 52 50 88 50 99
nbody 5 247 5 260 50 595 50 706
nqueens 5 119 5 121 50 74 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 173 50 616 50 678
protoboeuf-encode 5 179 5 193 50 326 50 794
rack 5 580 5 625 50 953 50 1069
ruby-json 5 85 5 83 50 50 50 49
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 163 50 159
tinygql 5 36 5 36 50 24 50 26
30k_ifelse 5 28 5 28 50 214 50 192
30k_methods 5 38 5 38 50 482 50 477
cfunc_itself 5 343 5 343 50 1046 50 1136
fib 5 127 5 126 50 900 50 962
getivar 5 206 5 216 50 2271 50 2627
keyword_args 5 108 5 103 50 959 50 1231
object-new 5 321 5 273 50 407 50 311
respond_to 5 137 5 140 50 3259 50 4034
ruby-xor 5 243 5 238 50 803 50 1381
setivar 5 360 5 356 50 3125 50 5716
setivar_object 5 372 5 347 50 762 50 843
setivar_young 5 372 5 355 50 768 50 844
str_concat 5 399 5 409 50 988 50 1156
throw 5 1274 5 1164 50 1718 50 1420

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) 1452511 1257015 213 2296 0 0% 0 0 65.687634
chunky-png (click) 292567 240888 86 1133 1 0% 0 0 33.383583
erubi-rails (click) 1941614 1678676 249 2846 8 0% 0 0 77.448038
hexapdf (click) 1491460 1231756 598 13862 39 0% 0 0 391.297602
liquid-c (click) 526124 428128 122 1903 5 0% 0 0 53.924622
liquid-compile (click) 411130 363348 150 2215 2 0% 0 0 69.43669
liquid-render (click) 602042 549214 139 2520 12 0% 0 0 69.328615
lobsters (click) 8327455 7091623 3213 54452 181 0% 0 0 1822.57505
mail (click) 775041 688199 346 5481 16 0% 0 0 158.135169
psych-load (click) 248821 234533 64 656 3 0% 0 0 20.505357
railsbench (click) 3298677 2923038 1635 16733 41 0% 0 0 474.960791
rubocop (click) 5831276 4966384 2891 52119 110 0% 4 0 1529.758239
ruby-lsp (click) 851713 678063 308 4990 26 0% 0 0 140.07578
sequel (click) 459278 444713 15 118 0 0% 0 0 4.505912
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.012835
blurhash (click) 57136 49713 29 501 0 0% 0 0 16.165729
erubi (click) 220621 185666 9 108 0 0% 0 0 3.614708
etanni (click) 24162 22865 9 82 0 0% 0 0 2.828964
fannkuchredux (click) 24038 30826 5 257 0 0% 0 0 7.730737
fluentd (click) 375455 311347 10 109 0 0% 0 0 3.779294
graphql (click) 398735 346431 69 695 0 0% 0 0 20.461164
graphql-native (click) 359803 315196 40 270 0 0% 0 0 8.533909
lee (click) 310192 280480 48 803 0 0% 0 0 24.648206
matmul (click) 11838 4563 10 119 0 0% 0 0 3.946176
nbody (click) 14884 19325 8 196 0 0% 0 0 5.108113
nqueens (click) 21155 28164 7 247 0 0% 0 0 7.251713
optcarrot (click) 327944 312320 190 4549 34 0% 0 0 103.462287
protoboeuf (click) 163392 155036 14 1610 0 0% 0 0 46.100464
protoboeuf-encode (click) 234584 230620 16 1249 0 0% 0 0 31.974571
rack (click) 226984 194381 36 417 0 0% 0 0 10.887052
ruby-json (click) 27105 23915 10 189 0 0% 0 0 5.38365
rubykon (click) 140297 120385 138 1566 3 0% 0 0 44.538289
sudoku (click) 48090 43120 9 536 0 0% 0 0 15.964298
tinygql (click) 266730 225954 61 787 5 0% 0 0 22.269579
30k_ifelse (click) 6315665 5791705 9261 56473 0 0% 0 0 1565.077199
30k_methods (click) 2235566 1593704 5780 19359 0 0% 0 0 453.207318
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.027895
fib (click) 4041 4120 5 37 0 0% 0 0 1.427412
getivar (click) 5037 6014 6 64 0 0% 0 0 1.898495
keyword_args (click) 7637 6022 7 60 0 0% 0 0 2.059139
object-new (click) 3469 3394 5 35 0 0% 0 0 1.346113
respond_to (click) 9322 2039 6 95 0 0% 0 0 2.791592
ruby-xor (click) 6437 6880 6 72 0 0% 0 0 2.235253
setivar (click) 4188 4690 6 44 0 0% 0 0 1.567495
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.717143
setivar_young (click) 5427 5560 7 54 0 0% 0 0 1.938336
str_concat (click) 7646 7893 9 81 0 0% 0 0 2.661164
throw (click) 7384 5592 8 59 0 0% 0 0 2.151444

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.