YJIT Benchmarks

Details for Benchmarks at 2024-10-30 03:45:48 UTC

YJIT metrics from the yjit-bench suite using Ruby 8cb0722fe8.

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 89.4% faster than CRuby 3.4.0dev
  • 4.2% faster than YJIT 3.3.4
On railsbench it is
  • 105.7% faster than CRuby 3.4.0dev
  • 5.4% faster than YJIT 3.3.4
x86_64 runtime: 3 hours, 34 minutes
aarch64 runtime: 3 hours, 30 minutes

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 81 50 155 50 161
chunky-png 5 31 5 31 50 15 50 20
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 415 5 415 50 577 50 623
liquid-compile 5 410 5 404 50 545 50 554
liquid-render 5 169 5 164 50 406 50 418
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 192 50 250 50 235
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 263
ruby-lsp 5 155 5 155 50 240 50 260
sequel 5 429 5 417 50 597 50 579
binarytrees 5 83 5 83 50 146 50 148
blurhash 5 82 5 84 50 128 50 145
erubi 5 87 5 143 50 50 50 122
etanni 5 90 5 97 50 52 50 60
fannkuchredux 5 53 5 55 50 101 50 108
fluentd 5 60 5 67 50 23 50 24
graphql 5 85 5 85 50 56 50 57
graphql-native 5 40 5 51 50 10 50 11
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 53 50 88 50 99
nbody 5 248 5 259 50 595 50 704
nqueens 5 119 5 121 50 74 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 167 5 171 50 617 50 675
protoboeuf-encode 5 178 5 194 50 327 50 793
rack 5 581 5 614 50 948 50 1046
ruby-json 5 85 5 82 50 50 50 49
rubykon 5 20 5 21 50 10 50 10
sudoku 5 48 5 49 50 163 50 161
tinygql 5 36 5 36 50 24 50 26
30k_ifelse 5 28 5 28 50 213 50 192
30k_methods 5 39 5 38 50 481 50 478
cfunc_itself 5 347 5 345 50 1046 50 1136
fib 5 127 5 127 50 898 50 962
getivar 5 206 5 216 50 2272 50 2615
keyword_args 5 108 5 104 50 959 50 1231
object-new 5 321 5 271 50 405 50 309
respond_to 5 137 5 139 50 3258 50 4035
ruby-xor 5 239 5 236 50 800 50 1376
setivar 5 361 5 357 50 3124 50 5716
setivar_object 5 372 5 348 50 764 50 789
setivar_young 5 372 5 344 50 770 50 845
str_concat 5 398 5 409 50 988 50 1156
throw 5 1267 5 1163 50 1724 50 1419

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) 1453503 1249402 213 2296 0 0% 0 0 66.430659
chunky-png (click) 296918 251251 86 1133 1 0% 0 0 33.665334
erubi-rails (click) 1944274 1665917 248 2847 8 0% 0 0 77.492812
hexapdf (click) 1499186 1264256 598 13856 35 0% 0 0 389.931888
liquid-c (click) 503856 410375 122 1906 5 0% 0 0 52.964934
liquid-compile (click) 421872 347830 150 2219 2 0% 0 0 68.496317
liquid-render (click) 603103 509892 139 2520 12 0% 0 0 70.00523
lobsters (click) 8316451 6897597 3212 54298 181 0% 0 0 1826.27409
mail (click) 771023 709170 346 5481 16 0% 0 0 159.043147
psych-load (click) 259550 220753 64 654 3 0% 0 0 20.368369
railsbench (click) 3331547 2943386 1635 16735 41 0% 0 0 483.876629
rubocop (click) 5810981 4824813 2891 52172 110 0% 4 0 1518.361252
ruby-lsp (click) 848163 699350 308 4990 26 0% 0 0 140.248153
sequel (click) 458613 395469 15 117 0 0% 0 0 4.21359
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.023738
blurhash (click) 57136 49713 29 501 0 0% 0 0 16.257981
erubi (click) 229019 184786 9 108 0 0% 0 0 3.691815
etanni (click) 24125 22834 9 82 0 0% 0 0 2.78669
fannkuchredux (click) 24038 30826 5 257 0 0% 0 0 7.836788
fluentd (click) 356903 288328 10 109 0 0% 0 0 3.785253
graphql (click) 396054 327479 69 695 0 0% 0 0 20.599886
graphql-native (click) 360675 309761 40 270 0 0% 0 0 8.631368
lee (click) 278708 235116 48 803 0 0% 0 0 24.764006
matmul (click) 11838 4563 10 119 0 0% 0 0 3.926604
nbody (click) 14884 19325 8 196 0 0% 0 0 5.129795
nqueens (click) 21155 28164 7 247 0 0% 0 0 7.352033
optcarrot (click) 327944 312320 190 4549 34 0% 0 0 106.336445
protoboeuf (click) 163392 155036 14 1610 0 0% 0 0 46.404981
protoboeuf-encode (click) 234584 230620 16 1249 0 0% 0 0 32.057666
rack (click) 239573 208884 36 417 0 0% 0 0 11.27993
ruby-json (click) 21296 18539 10 187 0 0% 0 0 5.380459
rubykon (click) 140297 120385 138 1566 3 0% 0 0 45.11289
sudoku (click) 48090 43120 9 536 0 0% 0 0 15.973273
tinygql (click) 271086 236377 61 787 5 0% 0 0 22.461634
30k_ifelse (click) 6315665 5791705 9261 56473 0 0% 0 0 1586.391024
30k_methods (click) 2235566 1593704 5780 19359 0 0% 0 0 454.703944
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 1.995609
fib (click) 4041 4120 5 37 0 0% 0 0 1.403873
getivar (click) 5037 6014 6 64 0 0% 0 0 1.915378
keyword_args (click) 7637 6022 7 60 0 0% 0 0 2.074637
object-new (click) 3469 3394 5 35 0 0% 0 0 1.322115
respond_to (click) 9322 2039 6 95 0 0% 0 0 2.740699
ruby-xor (click) 6437 6880 6 72 0 0% 0 0 2.230973
setivar (click) 4188 4690 6 44 0 0% 0 0 1.556512
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.674906
setivar_young (click) 5427 5560 7 54 0 0% 0 0 1.916431
str_concat (click) 7646 7893 9 81 0 0% 0 0 2.765463
throw (click) 7384 5592 8 59 0 0% 0 0 2.114184

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.