YJIT Benchmarks

Details for Benchmarks at 2024-12-08 03:49:05 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 92.1% faster than CRuby 3.4.0dev
  • 5.6% faster than YJIT 3.3.6
On railsbench it is
  • 95.4% faster than CRuby 3.4.0dev
  • 2.8% faster than YJIT 3.3.6
x86_64 runtime: 3 hours, 51 minutes
aarch64 runtime: 3 hours, 20 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 83 50 156 50 166
chunky-png 5 31 5 32 50 15 50 34
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 417 50 594 50 631
liquid-compile 5 409 5 412 50 541 50 560
liquid-render 5 172 5 171 50 406 50 438
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 193 50 252 50 252
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 155 50 250 50 264
ruby-lsp 5 155 5 141 50 242 50 266
sequel 5 428 5 419 50 600 50 587
binarytrees 5 84 5 82 50 143 50 142
blurhash 5 82 5 84 50 127 50 145
erubi 5 75 5 145 50 58 50 134
etanni 5 91 5 99 50 54 50 69
fannkuchredux 5 52 5 55 50 101 50 104
fluentd 5 63 5 65 50 25 50 31
graphql 5 84 5 85 50 57 50 57
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 54 50 84 50 96
nbody 5 248 5 251 50 577 50 717
nqueens 5 120 5 120 50 75 50 564
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 179 5 175 50 619 50 741
protoboeuf-encode 5 176 5 185 50 327 50 823
rack 5 575 5 631 50 954 50 1065
ruby-json 5 83 5 84 50 50 50 49
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 164 50 162
tinygql 5 36 5 38 50 23 50 29
30k_ifelse 5 28 5 28 50 215 50 195
30k_methods 5 38 5 39 50 482 50 473
cfunc_itself 5 342 5 325 50 1046 50 1135
fib 5 126 5 127 50 899 50 962
getivar 5 207 5 220 50 2268 50 2631
keyword_args 5 104 5 105 50 959 50 1231
object-new 5 321 5 311 50 404 50 375
respond_to 5 133 5 137 50 3254 50 4030
ruby-xor 5 241 5 245 50 803 50 1387
setivar 5 357 5 357 50 3123 50 5705
setivar_object 5 374 5 339 50 780 50 838
setivar_young 5 374 5 344 50 767 50 852
str_concat 5 401 5 392 50 966 50 1213
throw 5 1261 5 1265 50 1739 50 1647

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) 1487329 1259675 211 2342 0 0% 0 0 67.925756
chunky-png (click) 338330 276108 85 1207 1 0% 0 0 35.372825
erubi-rails (click) 1962821 1707590 259 3058 19 0% 0 0 82.938035
hexapdf (click) 1537103 1209684 596 13965 41 0% 0 0 398.322712
liquid-c (click) 500067 463472 115 1832 5 0% 0 0 50.935224
liquid-compile (click) 446124 370357 147 2197 2 0% 0 0 67.376821
liquid-render (click) 601422 516557 132 2454 12 0% 0 0 69.302905
lobsters (click) 8383525 7080313 3213 54722 188 0% 0 0 1853.207761
mail (click) 789053 697477 343 5567 16 0% 0 0 164.374132
psych-load (click) 286225 243483 62 647 3 0% 0 0 20.033894
railsbench (click) 3358177 2931681 1642 17076 52 0% 0 0 492.746325
rubocop (click) 5860659 5078124 2888 52405 110 0% 4 0 1536.924101
ruby-lsp (click) 891872 795209 306 4990 26 0% 0 0 140.783511
sequel (click) 469819 452748 12 112 0 0% 0 0 4.240939
binarytrees (click) 8966 7987 7 70 0 0% 0 0 2.809998
blurhash (click) 56475 49154 28 496 0 0% 0 0 15.901222
erubi (click) 261266 205047 6 104 0 0% 0 0 3.610591
etanni (click) 31577 29964 8 89 0 0% 0 0 3.007698
fannkuchredux (click) 23377 30267 4 252 0 0% 0 0 7.433494
fluentd (click) 377970 331137 8 100 0 0% 0 0 3.451608
graphql (click) 416414 385298 67 686 0 0% 0 0 21.293226
graphql-native (click) 382186 363494 38 261 0 0% 0 0 8.677714
lee (click) 316733 271677 46 830 0 0% 0 0 25.587551
loops-times (click) 7563 8052 6 78 0 0% 0 0 2.44425
matmul (click) 11177 4004 9 114 0 0% 0 0 3.678162
nbody (click) 14223 18766 7 191 0 0% 0 0 4.858612
nqueens (click) 20494 27605 6 242 0 0% 0 0 7.033723
optcarrot (click) 327283 311761 189 4544 34 0% 0 0 106.048196
protoboeuf (click) 162731 154477 13 1605 0 0% 0 0 45.30696
protoboeuf-encode (click) 233923 230061 15 1244 0 0% 0 0 31.928004
rack (click) 231597 215528 33 403 0 0% 0 0 10.486691
ruby-json (click) 26291 23278 9 181 0 0% 0 0 5.116538
rubykon (click) 143171 139818 138 1593 3 0% 0 0 45.511017
sudoku (click) 47391 34904 8 533 0 0% 0 0 15.814454
tinygql (click) 265820 219644 59 778 5 0% 0 0 21.896525
30k_ifelse (click) 6315004 5791146 9260 56468 0 0% 0 0 1562.830024
30k_methods (click) 2234900 1593140 5779 19354 0 0% 0 0 452.787097
cfunc_itself (click) 5707 4510 5 52 0 0% 0 0 1.592781
fib (click) 3380 3561 4 32 0 0% 0 0 1.22354
getivar (click) 3832 4970 4 54 0 0% 0 0 1.468647
keyword_args (click) 6976 5463 6 55 0 0% 0 0 1.88853
object-new (click) 2264 2350 3 25 0 0% 0 0 0.870014
respond_to (click) 8661 1480 5 90 0 0% 0 0 2.571819
ruby-xor (click) 5662 6266 5 67 0 0% 0 0 1.979425
setivar (click) 2983 3646 4 34 0 0% 0 0 1.103609
setivar_object (click) 3512 3794 4 36 0 0% 0 0 1.206787
setivar_young (click) 4222 4516 5 44 0 0% 0 0 1.413291
str_concat (click) 6441 6849 7 71 0 0% 0 0 2.271026
throw (click) 6179 4548 6 49 0 0% 0 0 1.697617

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.