YJIT Benchmarks

Details for Benchmarks at 2025-05-13 03:51:33 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 88.2% faster than CRuby 3.5.0dev
  • 5.3% faster than YJIT 3.3.6
On railsbench it is
  • 98.7% faster than CRuby 3.5.0dev
  • 6.0% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 25 minutes
aarch64 runtime: 3 hours, 44 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 83 5 83 50 155 50 153
chunky-png 5 31 5 32 50 14 50 22
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 411 5 423 50 588 50 621
liquid-compile 5 413 5 467 50 538 50 707
liquid-render 5 171 5 165 50 405 50 435
lobsters 5 19 5 19 50 10 50 10
mail 5 196 5 181 50 243 50 217
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 156 50 252 50 257
ruby-lsp 5 160 5 159 50 259 50 270
sequel 5 421 5 424 50 600 50 582
binarytrees 5 84 5 84 50 148 50 138
blurhash 5 82 5 88 50 127 50 145
erubi 5 124 5 138 50 98 50 146
etanni 5 90 5 97 50 55 50 67
fannkuchredux 5 52 5 58 50 92 50 106
fluentd 5 63 5 63 50 23 50 28
graphql 5 85 5 86 50 57 50 57
graphql-native 5 39 5 53 50 10 50 13
lee 5 23 5 23 50 10 50 10
matmul 5 50 5 51 50 85 50 96
nbody 5 248 5 249 50 576 50 652
nqueens 5 120 5 129 50 75 50 559
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 180 5 184 50 620 50 717
protoboeuf-encode 5 179 5 206 50 327 50 777
rack 5 594 5 620 50 948 50 1051
ruby-json 5 84 5 82 50 50 50 48
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 20 5 21 50 10 50 10
sudoku 5 48 5 51 50 162 50 166
tinygql 5 36 5 38 50 22 50 33
30k_ifelse 5 28 5 28 50 215 50 184
30k_methods 5 38 5 38 50 481 50 470
cfunc_itself 5 346 5 347 50 1147 50 1258
fib 5 127 5 137 50 910 50 933
getivar 5 207 5 278 50 2240 50 2360
keyword_args 5 107 5 107 50 1042 50 1243
loops-times 5 24 5 27 50 48 50 62
object-new 5 322 5 348 50 403 50 537
respond_to 5 134 5 124 50 3258 50 3912
ruby-xor 5 242 5 257 50 801 50 1313
setivar 5 357 5 608 50 3192 50 5093
setivar_object 5 354 5 477 50 667 50 799
setivar_young 5 365 5 477 50 686 50 822
str_concat 5 401 5 472 50 961 50 1167
throw 5 1263 5 1237 50 1741 50 1681

Different Ruby configurations want different amounts of warmup. With no JIT, CRuby needs hardly any. YJIT warms up fairly quickly, while some JITs may start slower as they do more advanced compilation.

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) 1491133 1288422 206 2590 0 0% 0 0 75.155644
chunky-png (click) 310419 304354 74 1330 1 0% 0 0 36.525385
erubi-rails (click) 1967786 1709298 262 3672 21 0% 0 0 96.029407
hexapdf (click) 1516499 1325721 593 15621 41 0% 0 0 425.45644
liquid-c (click) 498470 464561 114 2217 5 0% 0 0 58.686602
liquid-compile (click) 456708 373528 146 2709 2 0% 0 0 78.272502
liquid-render (click) 612841 595394 131 2933 8 0% 0 0 75.951132
lobsters (click) 8500763 7218321 3170 63580 119 0% 0 0 2030.413571
mail (click) 797931 741759 342 7227 40 0% 0 0 191.992246
psych-load (click) 265276 201240 61 812 3 0% 0 0 22.566869
railsbench (click) 3402215 2937451 1653 20215 56 0% 0 0 539.056074
rubocop (click) 5920633 5063390 2885 61730 113 0% 4 0 1700.264631
ruby-lsp (click) 891391 762059 305 5955 29 0% 0 0 155.835431
sequel (click) 510319 408374 11 114 0 0% 0 0 3.502663
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.462206
blurhash (click) 52289 51444 27 603 0 0% 0 0 16.991288
erubi (click) 246032 198432 5 125 0 0% 0 0 3.63043
etanni (click) 30806 32125 8 108 0 0% 0 0 3.298504
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.218177
fluentd (click) 393813 345070 7 115 0 0% 0 0 3.51925
graphql (click) 459714 422876 66 1035 0 0% 0 0 26.579705
graphql-native (click) 413567 388588 37 399 0 0% 0 0 10.429247
lee (click) 320033 294628 45 1012 0 0% 0 0 28.094111
matmul (click) 11125 4603 8 132 0 0% 0 0 3.988168
nbody (click) 13890 20235 6 238 0 0% 0 0 5.435766
nqueens (click) 22652 36960 5 387 0 0% 0 0 9.573799
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 106.439975
protoboeuf (click) 170142 177773 12 2836 0 0% 0 0 69.761597
protoboeuf-encode (click) 243031 283791 14 1815 0 0% 0 0 42.663048
rack (click) 280261 258153 31 496 0 0% 0 0 12.212425
ruby-json (click) 20664 18692 8 204 0 0% 0 0 5.461787
rubyboy (click) 728875 634103 177 6963 40 0% 0 0 164.685706
rubykon (click) 147890 164247 137 2092 3 0% 0 0 53.94489
sudoku (click) 52157 66291 7 871 0 0% 0 0 22.586631
tinygql (click) 289603 229004 58 977 5 0% 0 0 25.163168
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1868.15699
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 454.921688
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.387061
fib (click) 2659 2995 3 30 0 0% 0 0 1.01993
getivar (click) 3812 6802 3 78 0 0% 0 0 1.78721
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.672544
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.594002
object-new (click) 2406 2818 2 36 0 0% 0 0 1.061292
respond_to (click) 6451 6819 4 80 0 0% 0 0 1.96252
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.555751
setivar (click) 2783 3726 3 46 0 0% 0 0 1.182488
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.304226
setivar_young (click) 4297 4867 4 63 0 0% 0 0 1.590693
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.316071
throw (click) 5953 4624 5 53 0 0% 0 0 1.671051

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.