YJIT Benchmarks

Details for Benchmarks at 2024-12-26 03:44:33 UTC

YJIT metrics from the yjit-bench suite using Ruby 5fab10999d.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 91.5% faster than CRuby 3.5.0dev
  • 6.2% faster than YJIT 3.3.6
On railsbench it is
  • 97.6% faster than CRuby 3.5.0dev
  • 6.4% faster than YJIT 3.3.6
x86_64 runtime: 3 hours, 50 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.5.0dev warmups CRuby 3.5.0dev iters YJIT 3.3.6 warmups YJIT 3.3.6 iters YJIT 3.5.0dev warmups YJIT 3.5.0dev iters
activerecord 5 82 5 84 50 155 50 163
chunky-png 5 32 5 32 50 15 50 34
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 421 50 575 50 625
liquid-compile 5 425 5 408 50 539 50 558
liquid-render 5 172 5 166 50 404 50 436
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 186 50 251 50 251
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 251 50 266
ruby-lsp 5 156 5 157 50 261 50 273
sequel 5 432 5 417 50 569 50 590
binarytrees 5 84 5 81 50 145 50 139
blurhash 5 82 5 82 50 127 50 145
erubi 5 75 5 144 50 98 50 148
etanni 5 91 5 97 50 54 50 71
fannkuchredux 5 48 5 55 50 100 50 103
fluentd 5 64 5 63 50 26 50 30
graphql 5 84 5 84 50 56 50 56
graphql-native 5 47 5 52 50 10 50 15
lee 5 22 5 23 50 10 50 10
loops-times 5 24 5 23 50 48 50 65
matmul 5 51 5 51 50 85 50 98
nbody 5 248 5 257 50 577 50 703
nqueens 5 120 5 118 50 75 50 564
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 174 50 620 50 720
protoboeuf-encode 5 179 5 197 50 327 50 832
rack 5 593 5 621 50 946 50 1038
ruby-json 5 83 5 85 50 49 50 51
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 164 50 160
tinygql 5 36 5 37 50 22 50 28
30k_ifelse 5 28 5 28 50 215 50 206
30k_methods 5 38 5 38 50 481 50 474
cfunc_itself 5 352 5 327 50 1046 50 1144
fib 5 127 5 128 50 909 50 937
getivar 5 207 5 219 50 2256 50 2634
keyword_args 5 107 5 102 50 959 50 1134
object-new 5 321 5 311 50 404 50 379
respond_to 5 133 5 141 50 3261 50 3982
ruby-xor 5 232 5 245 50 803 50 1372
setivar 5 358 5 358 50 3127 50 5717
setivar_object 5 374 5 341 50 747 50 852
setivar_young 5 373 5 344 50 771 50 849
str_concat 5 402 5 392 50 970 50 1202
throw 5 1263 5 1267 50 1740 50 1699

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) 1411762 1184156 210 2207 0 0% 0 0 65.536001
chunky-png (click) 327586 271591 85 1132 1 0% 0 0 33.441487
erubi-rails (click) 1885967 1663035 260 2937 19 0% 0 0 79.559086
hexapdf (click) 1469121 1245694 596 13145 41 0% 0 0 379.728393
liquid-c (click) 507464 455653 115 1750 5 0% 0 0 49.810863
liquid-compile (click) 431053 352584 147 2071 2 0% 0 0 63.870169
liquid-render (click) 581674 537768 132 2315 8 0% 0 0 65.904623
lobsters (click) 8099859 6699203 3212 52516 169 0% 0 0 1797.954859
mail (click) 729276 602518 343 5321 14 0% 0 0 158.146115
psych-load (click) 254355 199658 62 618 3 0% 0 0 19.131288
railsbench (click) 3228335 2758879 1642 16201 52 0% 0 0 477.597847
rubocop (click) 5698568 4920959 2888 50581 110 0% 4 0 1481.336244
ruby-lsp (click) 834396 796644 306 4737 24 0% 0 0 134.764776
sequel (click) 478643 403248 12 97 0 0% 0 0 3.458484
binarytrees (click) 7424 6400 7 55 0 0% 0 0 2.399788
blurhash (click) 50449 51120 28 441 0 0% 0 0 14.402183
erubi (click) 228699 205402 6 100 0 0% 0 0 3.312823
etanni (click) 27627 26630 9 91 0 0% 0 0 3.103372
fannkuchredux (click) 23377 30267 4 252 0 0% 0 0 7.419251
fluentd (click) 372470 341939 8 96 0 0% 0 0 3.175416
graphql (click) 404453 347409 67 679 0 0% 0 0 21.030347
graphql-native (click) 361794 335482 38 258 0 0% 0 0 8.68336
lee (click) 303541 264299 46 749 0 0% 0 0 23.408518
loops-times (click) 7034 7662 6 74 0 0% 0 0 2.37861
matmul (click) 10988 3769 9 112 0 0% 0 0 3.641211
nbody (click) 13396 17343 7 175 0 0% 0 0 4.593153
nqueens (click) 20494 27605 6 242 0 0% 0 0 7.033965
optcarrot (click) 319427 243061 189 4402 34 0% 0 0 100.394782
protoboeuf (click) 151228 130005 13 1484 0 0% 0 0 42.513178
protoboeuf-encode (click) 221443 220595 15 1223 0 0% 0 0 31.256565
rack (click) 265441 233568 33 388 0 0% 0 0 10.265774
ruby-json (click) 25870 22931 9 181 0 0% 0 0 5.10945
rubykon (click) 135230 146429 138 1500 3 0% 0 0 43.024141
sudoku (click) 45866 41280 8 521 0 0% 0 0 15.402534
tinygql (click) 299034 253666 59 765 5 0% 0 0 21.855546
30k_ifelse (click) 5659135 5285109 9260 51671 0 0% 0 0 1412.826098
30k_methods (click) 2234900 1593140 5779 19354 0 0% 0 0 448.477521
cfunc_itself (click) 5461 4343 5 50 0 0% 0 0 1.512093
fib (click) 2930 3118 4 29 0 0% 0 0 1.124729
getivar (click) 3832 4970 4 54 0 0% 0 0 1.48726
keyword_args (click) 6651 5070 6 52 0 0% 0 0 1.755934
object-new (click) 2264 2350 3 25 0 0% 0 0 0.932437
respond_to (click) 6199 6484 5 65 0 0% 0 0 1.920807
ruby-xor (click) 5662 6266 5 67 0 0% 0 0 2.000882
setivar (click) 2983 3646 4 34 0 0% 0 0 1.153872
setivar_object (click) 3512 3794 4 36 0 0% 0 0 1.210394
setivar_young (click) 4222 4516 5 44 0 0% 0 0 1.424744
str_concat (click) 5800 6273 7 65 0 0% 0 0 2.066575
throw (click) 6179 4548 6 49 0 0% 0 0 1.71769

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.