YJIT Benchmarks

Details for Benchmarks at 2024-12-13 03:48:56 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 91.5% faster than CRuby 3.4.0dev
  • 5.0% faster than YJIT 3.3.6
On railsbench it is
  • 99.0% faster than CRuby 3.4.0dev
  • 2.4% faster than YJIT 3.3.6
x86_64 runtime: 3 hours, 51 minutes
aarch64 runtime: 3 hours, 18 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 82 50 156 50 161
chunky-png 5 31 5 32 50 15 50 33
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 408 5 426 50 591 50 627
liquid-compile 5 409 5 422 50 573 50 558
liquid-render 5 171 5 167 50 405 50 421
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 186 50 251 50 252
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 157 5 156 50 252 50 267
ruby-lsp 5 156 5 154 50 248 50 266
sequel 5 415 5 421 50 594 50 591
binarytrees 5 84 5 82 50 144 50 139
blurhash 5 82 5 84 50 127 50 145
erubi 5 116 5 144 50 98 50 147
etanni 5 91 5 100 50 54 50 71
fannkuchredux 5 52 5 55 50 99 50 104
fluentd 5 64 5 66 50 25 50 24
graphql 5 84 5 85 50 57 50 56
graphql-native 5 40 5 53 50 10 50 15
lee 5 23 5 23 50 10 50 10
loops-times 5 24 5 23 50 48 50 64
matmul 5 51 5 53 50 84 50 99
nbody 5 249 5 253 50 577 50 707
nqueens 5 120 5 121 50 75 50 565
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 171 50 620 50 728
protoboeuf-encode 5 180 5 199 50 327 50 792
rack 5 579 5 619 50 951 50 1068
ruby-json 5 83 5 86 50 50 50 51
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 164 50 161
tinygql 5 36 5 37 50 22 50 28
30k_ifelse 5 28 5 28 50 215 50 206
30k_methods 5 39 5 38 50 483 50 463
cfunc_itself 5 342 5 339 50 1046 50 1145
fib 5 126 5 127 50 899 50 935
getivar 5 208 5 212 50 2267 50 2612
keyword_args 5 105 5 104 50 959 50 1134
object-new 5 321 5 311 50 404 50 381
respond_to 5 133 5 134 50 3255 50 3980
ruby-xor 5 242 5 244 50 803 50 1383
setivar 5 358 5 357 50 3124 50 5704
setivar_object 5 373 5 348 50 783 50 850
setivar_young 5 373 5 344 50 765 50 852
str_concat 5 402 5 395 50 966 50 1188
throw 5 1260 5 1267 50 1744 50 1682

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) 1416171 1204205 210 2211 0 0% 0 0 64.576438
chunky-png (click) 326064 286632 85 1127 1 0% 0 0 32.903032
erubi-rails (click) 1897919 1567904 259 2971 19 0% 0 0 81.042675
hexapdf (click) 1439542 1244990 596 13159 41 0% 0 0 381.318611
liquid-c (click) 508436 432366 115 1764 5 0% 0 0 50.288354
liquid-compile (click) 427770 367151 147 2096 2 0% 0 0 65.568037
liquid-render (click) 583637 491102 132 2329 8 0% 0 0 65.927625
lobsters (click) 8135343 6810608 3214 52709 169 0% 0 0 1794.195533
mail (click) 728729 602016 343 5321 14 0% 0 0 155.373397
psych-load (click) 246328 225143 62 620 3 0% 0 0 19.419785
railsbench (click) 3239065 2850280 1642 16212 52 0% 0 0 470.213537
rubocop (click) 5669048 5028511 2888 50563 110 0% 4 0 1473.134753
ruby-lsp (click) 846438 757090 306 4745 24 0% 0 0 135.06715
sequel (click) 447794 416864 12 105 0 0% 0 0 3.842805
binarytrees (click) 7424 6400 7 55 0 0% 0 0 2.36169
blurhash (click) 50590 43092 28 442 0 0% 0 0 14.412582
erubi (click) 252370 212250 6 100 0 0% 0 0 3.422838
etanni (click) 27627 26630 9 91 0 0% 0 0 3.086283
fannkuchredux (click) 23377 30267 4 252 0 0% 0 0 7.461583
fluentd (click) 337831 296394 8 96 0 0% 0 0 3.260906
graphql (click) 401140 348426 67 679 0 0% 0 0 21.147399
graphql-native (click) 360302 309747 38 258 0 0% 0 0 8.583162
lee (click) 272445 239626 46 749 0 0% 0 0 23.517532
loops-times (click) 7034 7662 6 74 0 0% 0 0 2.356013
matmul (click) 10988 3769 9 112 0 0% 0 0 3.649256
nbody (click) 13396 17343 7 175 0 0% 0 0 4.57894
nqueens (click) 20494 27605 6 242 0 0% 0 0 6.981381
optcarrot (click) 319427 243061 189 4402 34 0% 0 0 101.969761
protoboeuf (click) 151228 130005 13 1484 0 0% 0 0 42.032297
protoboeuf-encode (click) 221443 220595 15 1223 0 0% 0 0 31.48769
rack (click) 226440 185247 33 388 0 0% 0 0 10.266791
ruby-json (click) 25911 22980 9 181 0 0% 0 0 5.114166
rubykon (click) 134794 137671 138 1494 3 0% 0 0 43.013382
sudoku (click) 45866 41280 8 521 0 0% 0 0 15.353164
tinygql (click) 268844 236179 59 765 5 0% 0 0 21.890509
30k_ifelse (click) 5659135 5285109 9260 51671 0 0% 0 0 1422.193169
30k_methods (click) 2234900 1593140 5779 19354 0 0% 0 0 452.344609
cfunc_itself (click) 5461 4343 5 50 0 0% 0 0 1.533977
fib (click) 2930 3118 4 29 0 0% 0 0 1.163835
getivar (click) 3832 4970 4 54 0 0% 0 0 1.447163
keyword_args (click) 6651 5070 6 52 0 0% 0 0 1.770477
object-new (click) 2264 2350 3 25 0 0% 0 0 0.902536
respond_to (click) 6199 6484 5 65 0 0% 0 0 1.887661
ruby-xor (click) 5662 6266 5 67 0 0% 0 0 1.989935
setivar (click) 2983 3646 4 34 0 0% 0 0 1.127287
setivar_object (click) 3512 3794 4 36 0 0% 0 0 1.23478
setivar_young (click) 4222 4516 5 44 0 0% 0 0 1.497893
str_concat (click) 5800 6273 7 65 0 0% 0 0 2.117563
throw (click) 6179 4548 6 49 0 0% 0 0 1.672831

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.