YJIT Benchmarks

Details for Benchmarks at 2025-05-02 03:50:07 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 86.8% faster than CRuby 3.5.0dev
  • 6.5% faster than YJIT 3.3.6
On railsbench it is
  • 99.1% faster than CRuby 3.5.0dev
  • 5.0% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 19 minutes
aarch64 runtime: 3 hours, 40 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 87 50 157 50 173
chunky-png 5 31 5 33 50 14 50 24
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 411 5 410 50 573 50 543
liquid-compile 5 409 5 463 50 543 50 698
liquid-render 5 171 5 172 50 406 50 390
lobsters 5 19 5 20 50 10 50 10
mail 5 191 5 178 50 238 50 210
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 157 5 160 50 250 50 275
ruby-lsp 5 155 5 164 50 236 50 269
sequel 5 423 5 419 50 576 50 591
binarytrees 5 84 5 82 50 149 50 135
blurhash 5 82 5 86 50 127 50 144
erubi 5 124 5 146 50 99 50 145
etanni 5 90 5 101 50 54 50 67
fannkuchredux 5 52 5 58 50 99 50 108
fluentd 5 64 5 62 50 24 50 28
graphql 5 85 5 87 50 57 50 59
graphql-native 5 40 5 57 50 10 50 20
lee 5 22 5 26 50 10 50 10
matmul 5 50 5 51 50 85 50 95
nbody 5 248 5 242 50 575 50 658
nqueens 5 120 5 127 50 75 50 561
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 188 50 620 50 736
protoboeuf-encode 5 180 5 214 50 328 50 823
rack 5 589 5 639 50 951 50 1059
ruby-json 5 84 5 82 50 50 50 49
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 20 5 23 50 10 50 10
sudoku 5 48 5 51 50 162 50 161
tinygql 5 36 5 38 50 22 50 31
30k_ifelse 5 28 5 28 50 216 50 207
30k_methods 5 39 5 38 50 481 50 471
cfunc_itself 5 346 5 371 50 1147 50 1258
fib 5 127 5 147 50 910 50 932
getivar 5 207 5 307 50 2244 50 2744
keyword_args 5 107 5 111 50 1042 50 1243
loops-times 5 24 5 27 50 48 50 65
object-new 5 323 5 363 50 404 50 656
respond_to 5 134 5 140 50 3258 50 3988
ruby-xor 5 240 5 264 50 801 50 1370
setivar 5 358 5 568 50 3196 50 5896
setivar_object 5 355 5 445 50 665 50 804
setivar_young 5 365 5 445 50 685 50 799
str_concat 5 401 5 423 50 959 50 1164
throw 5 1259 5 1239 50 1730 50 1642

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) 1458165 1233825 206 2230 0 0% 0 0 64.572471
chunky-png (click) 327486 262627 74 1073 1 0% 0 0 31.917192
erubi-rails (click) 1933159 1531964 262 3079 21 0% 0 0 89.823677
hexapdf (click) 1446524 1287377 595 13344 38 0% 0 0 380.737899
liquid-c (click) 507365 446171 114 1758 5 0% 0 0 48.828082
liquid-compile (click) 447046 366142 146 2183 2 0% 0 0 67.840037
liquid-render (click) 606227 544461 131 2325 8 0% 0 0 65.212874
lobsters (click) 8310383 6958903 3172 54468 112 0% 0 0 1867.598877
mail (click) 798438 711966 342 5636 40 0% 0 0 168.287952
psych-load (click) 264166 240929 61 645 3 0% 0 0 19.66243
railsbench (click) 3268174 2786784 1653 16737 54 0% 0 0 483.749477
rubocop (click) 5717538 4878040 2885 51140 113 0% 4 0 1550.603133
ruby-lsp (click) 820103 781753 305 4836 24 0% 0 0 137.125876
sequel (click) 490973 404842 11 94 0 0% 0 0 3.460822
binarytrees (click) 7093 6143 6 52 0 0% 0 0 2.266646
blurhash (click) 50446 50805 27 444 0 0% 0 0 14.418611
erubi (click) 264808 240074 5 99 0 0% 0 0 3.251283
etanni (click) 30101 29597 8 88 0 0% 0 0 2.974588
fannkuchredux (click) 23031 13626 3 249 0 0% 0 0 7.392024
fluentd (click) 408190 304342 7 93 0 0% 0 0 3.14043
graphql (click) 418262 366976 66 705 0 0% 0 0 20.402442
graphql-native (click) 382320 345762 37 293 0 0% 0 0 8.362575
lee (click) 309922 254093 45 799 0 0% 0 0 24.305197
matmul (click) 10810 11796 8 111 0 0% 0 0 3.625833
nbody (click) 13050 17086 6 172 0 0% 0 0 4.440662
nqueens (click) 20756 19597 5 247 0 0% 0 0 7.053084
optcarrot (click) 318856 234467 188 4395 34 0% 0 0 102.037281
protoboeuf (click) 150678 129601 12 1479 0 0% 0 0 42.406049
protoboeuf-encode (click) 221062 212146 14 1220 0 0% 0 0 31.395417
rack (click) 242035 204322 31 383 0 0% 0 0 10.18319
ruby-json (click) 20382 17779 8 181 0 0% 0 0 5.088292
rubyboy (click) 700071 643409 177 5886 40 0% 0 0 147.028299
rubykon (click) 135193 121132 137 1513 3 0% 0 0 43.060807
sudoku (click) 46753 50636 7 535 0 0% 0 0 15.902423
tinygql (click) 272208 228023 58 824 5 0% 0 0 22.814949
30k_ifelse (click) 5658774 5284843 9259 51667 0 0% 0 0 1446.509754
30k_methods (click) 2234569 1592883 5778 19351 0 0% 0 0 455.341105
cfunc_itself (click) 5130 4086 4 47 0 0% 0 0 1.369096
fib (click) 2599 2861 3 26 0 0% 0 0 0.966108
getivar (click) 3501 4713 3 51 0 0% 0 0 1.361151
keyword_args (click) 6320 4813 5 49 0 0% 0 0 1.621323
loops-times (click) 6843 7499 5 72 0 0% 0 0 2.371718
object-new (click) 2301 2493 2 29 0 0% 0 0 0.967011
respond_to (click) 6409 6687 4 71 0 0% 0 0 1.870082
ruby-xor (click) 5331 6009 4 64 0 0% 0 0 1.918401
setivar (click) 2652 3389 3 31 0 0% 0 0 1.014621
setivar_object (click) 3181 3537 3 33 0 0% 0 0 1.136622
setivar_young (click) 4031 4260 4 44 0 0% 0 0 1.377198
str_concat (click) 5622 6117 6 64 0 0% 0 0 2.12864
throw (click) 5848 4291 5 46 0 0% 0 0 1.613553

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.