YJIT Benchmarks

Details for Benchmarks at 2024-11-25 03:48:25 UTC

YJIT metrics from the yjit-bench suite using Ruby b305df8c78.

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 86.2% faster than CRuby 3.4.0dev
  • 3.5% faster than YJIT 3.3.6
On railsbench it is
  • 96.5% faster than CRuby 3.4.0dev
  • 4.0% faster than YJIT 3.3.6
x86_64 runtime: 3 hours, 44 minutes
aarch64 runtime: 3 hours, 11 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.6 warmups CRuby 3.3.6 iters CRuby 3.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.3.6 warmups YJIT 3.3.6 iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 5 82 5 83 50 156 50 161
chunky-png 5 32 5 32 50 15 50 35
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 424 50 570 50 625
liquid-compile 5 409 5 407 50 545 50 555
liquid-render 5 172 5 170 50 405 50 439
lobsters 5 20 5 20 50 10 50 10
mail 5 189 5 194 50 251 50 254
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 250 50 261
ruby-lsp 5 157 5 161 50 250 50 200
sequel 5 415 5 412 50 575 50 582
binarytrees 5 84 5 83 50 144 50 151
blurhash 5 82 5 81 50 127 50 145
erubi 5 116 5 140 50 98 50 143
etanni 5 91 5 100 50 54 50 70
fannkuchredux 5 52 5 55 50 101 50 105
fluentd 5 63 5 62 50 25 50 28
graphql 5 85 5 85 50 57 50 55
graphql-native 5 40 5 53 50 10 50 15
lee 5 22 5 23 50 10 50 10
matmul 5 51 5 49 50 84 50 99
nbody 5 248 5 248 50 577 50 715
nqueens 5 119 5 119 50 75 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 180 5 175 50 620 50 743
protoboeuf-encode 5 178 5 201 50 326 50 795
rack 5 571 5 632 50 955 50 1070
ruby-json 5 83 5 83 50 49 50 51
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 164 50 171
tinygql 5 35 5 37 50 23 50 26
30k_ifelse 5 28 5 28 50 214 50 193
30k_methods 5 38 5 39 50 484 50 475
cfunc_itself 5 342 5 354 50 1046 50 1136
fib 5 126 5 126 50 900 50 963
getivar 5 207 5 215 50 2261 50 2620
keyword_args 5 105 5 108 50 959 50 1231
object-new 5 321 5 319 50 404 50 397
respond_to 5 133 5 139 50 3253 50 4039
ruby-xor 5 242 5 246 50 803 50 1381
setivar 5 358 5 357 50 3124 50 5704
setivar_object 5 374 5 340 50 780 50 843
setivar_young 5 373 5 343 50 765 50 862
str_concat 5 402 5 396 50 966 50 1191
throw 5 1260 5 1326 50 1743 50 1742

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) 1459783 1270453 213 2351 0 0% 0 0 69.072043
chunky-png (click) 323904 282193 88 1225 17 1% 0 0 37.140322
erubi-rails (click) 1974548 1612412 264 3092 19 0% 0 0 85.976686
hexapdf (click) 1506561 1287378 600 13959 174 1% 0 0 398.358142
liquid-c (click) 527072 487385 119 1852 5 0% 0 0 53.118819
liquid-compile (click) 418645 379840 150 2211 2 0% 0 0 70.29474
liquid-render (click) 620643 518090 136 2474 12 0% 0 0 70.311606
lobsters (click) 8426079 7041437 3216 54905 188 0% 0 0 1871.787262
mail (click) 753568 653516 347 5588 57 1% 0 0 162.227336
psych-load (click) 258909 217148 65 663 16 2% 0 0 21.00992
railsbench (click) 3349643 2867290 1646 16998 52 0% 0 0 499.876593
rubocop (click) 5854396 4997542 2893 52407 111 0% 4 0 1558.581319
ruby-lsp (click) 866037 807852 309 5005 26 0% 0 0 143.243237
sequel (click) 470226 395161 16 126 54 42% 0 0 5.04321
binarytrees (click) 14303 12795 14 125 0 0% 1 0 4.515191
blurhash (click) 61812 53991 35 551 1 0% 1 0 17.802683
erubi (click) 243274 183126 8 113 0 0% 0 0 3.763796
etanni (click) 32243 30528 9 94 0 0% 0 0 3.241195
fannkuchredux (click) 28719 35080 11 307 0 0% 1 0 9.262104
fluentd (click) 351473 300319 10 109 0 0% 0 0 3.779223
graphql (click) 412299 340276 69 695 0 0% 0 0 22.077528
graphql-native (click) 390332 330513 40 270 0 0% 0 0 9.235326
lee (click) 318617 257492 49 848 17 2% 0 0 26.487351
matmul (click) 16519 8883 16 169 4 2% 1 0 5.401234
nbody (click) 19555 23574 14 246 0 0% 1 0 6.607228
nqueens (click) 25836 32550 13 297 4 1% 1 0 8.803791
optcarrot (click) 331857 315992 195 4591 38 0% 1 0 108.564383
protoboeuf (click) 167305 158566 19 1652 0 0% 1 0 47.347174
protoboeuf-encode (click) 238492 234145 21 1291 0 0% 1 0 33.579271
rack (click) 254507 219915 37 424 16 3% 0 0 11.436815
ruby-json (click) 27078 23913 10 187 0 0% 0 0 5.396658
rubykon (click) 146625 126486 144 1630 7 0% 1 0 46.831741
sudoku (click) 51960 39259 14 580 7 1% 1 0 17.443533
tinygql (click) 278030 238129 62 795 20 2% 0 0 22.776768
30k_ifelse (click) 6316839 5792957 9263 56487 0 0% 1 0 1572.543202
30k_methods (click) 2240242 1597953 5786 19409 0 0% 1 0 456.83754
cfunc_itself (click) 8081 6806 9 76 0 0% 0 0 2.483305
fib (click) 5210 5372 7 51 0 0% 0 0 1.912795
getivar (click) 9718 10268 12 114 0 0% 1 0 3.458042
keyword_args (click) 12318 10276 13 110 0 0% 1 0 3.616002
object-new (click) 8145 7709 11 85 1 1% 1 0 2.886617
respond_to (click) 13998 6288 12 145 0 0% 1 0 4.278125
ruby-xor (click) 10978 11066 12 122 2 1% 1 0 3.765212
setivar (click) 8869 8944 12 94 0 0% 1 0 3.069603
setivar_object (click) 9398 9092 12 96 0 0% 1 0 3.250611
setivar_young (click) 10108 9814 13 104 0 0% 1 0 3.445368
str_concat (click) 12327 12217 15 131 3 2% 1 0 4.283029
throw (click) 12065 9846 14 109 0 0% 1 0 3.679615

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.