YJIT Benchmarks

Details for Benchmarks at 2024-11-23 03:46:34 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 89.7% faster than CRuby 3.4.0dev
  • 5.8% faster than YJIT 3.3.6
On railsbench it is
  • 96.9% faster than CRuby 3.4.0dev
  • 4.3% 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 83 5 82 50 157 50 165
chunky-png 5 31 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 413 5 423 50 562 50 612
liquid-compile 5 412 5 410 50 540 50 563
liquid-render 5 171 5 165 50 400 50 428
lobsters 5 20 5 20 50 10 50 10
mail 5 188 5 193 50 237 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 155 50 250 50 264
ruby-lsp 5 154 5 158 50 243 50 258
sequel 5 428 5 420 50 597 50 568
binarytrees 5 84 5 83 50 144 50 151
blurhash 5 82 5 80 50 127 50 145
erubi 5 114 5 149 50 86 50 139
etanni 5 91 5 100 50 54 50 70
fannkuchredux 5 52 5 55 50 101 50 109
fluentd 5 63 5 64 50 25 50 31
graphql 5 84 5 86 50 57 50 57
graphql-native 5 48 5 52 50 10 50 11
lee 5 22 5 22 50 10 50 10
matmul 5 51 5 49 50 84 50 100
nbody 5 248 5 245 50 577 50 716
nqueens 5 120 5 117 50 75 50 565
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 172 5 174 50 620 50 729
protoboeuf-encode 5 179 5 199 50 325 50 789
rack 5 584 5 619 50 955 50 1078
ruby-json 5 84 5 84 50 50 50 51
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 164 50 172
tinygql 5 36 5 37 50 23 50 27
30k_ifelse 5 28 5 28 50 214 50 193
30k_methods 5 39 5 38 50 480 50 477
cfunc_itself 5 342 5 338 50 1046 50 1136
fib 5 126 5 112 50 900 50 963
getivar 5 207 5 214 50 2267 50 2627
keyword_args 5 105 5 104 50 959 50 1231
object-new 5 321 5 318 50 404 50 396
respond_to 5 133 5 138 50 3252 50 4039
ruby-xor 5 241 5 243 50 804 50 1383
setivar 5 358 5 358 50 3124 50 5707
setivar_object 5 374 5 340 50 779 50 843
setivar_young 5 373 5 343 50 767 50 862
str_concat 5 402 5 392 50 963 50 1195
throw 5 1260 5 1321 50 1741 50 1741

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) 1489221 1286037 213 2351 0 0% 0 0 68.373078
chunky-png (click) 340984 287091 88 1230 17 1% 0 0 36.5345
erubi-rails (click) 1970547 1679333 254 2884 10 0% 0 0 78.71627
hexapdf (click) 1505210 1228330 600 13950 174 1% 0 0 399.661862
liquid-c (click) 527072 495589 119 1852 5 0% 0 0 52.848444
liquid-compile (click) 425625 327980 150 2219 2 0% 0 0 69.026405
liquid-render (click) 614005 528355 136 2474 12 0% 0 0 69.329992
lobsters (click) 8409078 7120811 3215 54830 188 0% 0 0 1872.171663
mail (click) 750681 683044 347 5597 57 1% 0 0 165.659126
psych-load (click) 257348 219120 65 661 17 2% 0 0 20.784724
railsbench (click) 3383464 2894559 1646 16984 52 0% 0 0 484.645894
rubocop (click) 5863571 5099078 2891 52436 110 0% 4 0 1539.92846
ruby-lsp (click) 858962 724853 309 5004 26 0% 0 0 143.744354
sequel (click) 479887 399954 16 128 61 47% 0 0 4.688082
binarytrees (click) 14303 12795 14 125 0 0% 1 0 4.547116
blurhash (click) 61812 53991 35 551 1 0% 1 0 17.694089
erubi (click) 239417 202438 8 113 0 0% 0 0 3.818806
etanni (click) 32243 30528 9 94 0 0% 0 0 3.256653
fannkuchredux (click) 28719 35080 11 307 0 0% 1 0 9.194246
fluentd (click) 347278 298222 10 109 0 0% 0 0 3.837207
graphql (click) 419590 380577 69 695 0 0% 0 0 21.861908
graphql-native (click) 407375 360114 40 270 0 0% 0 0 9.072833
lee (click) 291545 259806 49 848 17 2% 0 0 26.302698
matmul (click) 16519 8883 16 169 4 2% 1 0 5.478036
nbody (click) 19555 23574 14 246 0 0% 1 0 6.606974
nqueens (click) 25836 32550 13 297 4 1% 1 0 8.734635
optcarrot (click) 331857 315992 195 4591 38 0% 1 0 105.450307
protoboeuf (click) 167305 158566 19 1652 0 0% 1 0 47.20736
protoboeuf-encode (click) 238492 234145 21 1291 0 0% 1 0 33.549881
rack (click) 249155 239766 37 424 16 3% 0 0 11.28472
ruby-json (click) 25474 21941 10 187 0 0% 0 0 5.390486
rubykon (click) 146625 126486 144 1630 7 0% 1 0 46.894359
sudoku (click) 51960 39259 14 580 7 1% 1 0 17.428839
tinygql (click) 284343 251003 62 795 20 2% 0 0 22.588139
30k_ifelse (click) 6316839 5792957 9263 56487 0 0% 1 0 1564.933229
30k_methods (click) 2240242 1597953 5786 19409 0 0% 1 0 451.489163
cfunc_itself (click) 11593 9808 13 112 0 0% 1 0 3.55484
fib (click) 8722 8374 11 87 0 0% 1 0 2.960564
getivar (click) 9718 10268 12 114 0 0% 1 0 3.472825
keyword_args (click) 12318 10276 13 110 0 0% 1 0 3.633323
object-new (click) 8145 7709 11 85 1 1% 1 0 2.812697
respond_to (click) 13998 6288 12 145 0 0% 1 0 4.297403
ruby-xor (click) 10978 11066 12 122 2 1% 1 0 3.710365
setivar (click) 8869 8944 12 94 0 0% 1 0 3.232502
setivar_object (click) 9398 9092 12 96 0 0% 1 0 3.349624
setivar_young (click) 10108 9814 13 104 0 0% 1 0 3.388427
str_concat (click) 12327 12217 15 131 3 2% 1 0 4.230966
throw (click) 12065 9846 14 109 0 0% 1 0 3.705591

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.