YJIT Benchmarks

Details for Benchmarks at 2024-12-24 03:44:38 UTC

YJIT metrics from the yjit-bench suite using Ruby 42026ec3da.

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 89.2% faster than CRuby 3.4.0dev
  • 5.2% faster than YJIT 3.3.6
On railsbench it is
  • 96.6% faster than CRuby 3.4.0dev
  • 5.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 157 50 161
chunky-png 5 31 5 32 50 15 50 33
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 407 5 418 50 592 50 625
liquid-compile 5 408 5 407 50 537 50 556
liquid-render 5 170 5 170 50 403 50 426
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 193 50 236 50 240
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 249 50 265
ruby-lsp 5 158 5 157 50 249 50 265
sequel 5 429 5 418 50 596 50 580
binarytrees 5 84 5 82 50 144 50 139
blurhash 5 82 5 82 50 127 50 145
erubi 5 96 5 148 50 98 50 141
etanni 5 91 5 98 50 54 50 72
fannkuchredux 5 52 5 55 50 101 50 106
fluentd 5 64 5 64 50 26 50 28
graphql 5 84 5 87 50 57 50 59
graphql-native 5 40 5 52 50 10 50 15
lee 5 23 5 23 50 10 50 10
loops-times 5 24 5 23 50 48 50 65
matmul 5 51 5 51 50 85 50 97
nbody 5 248 5 257 50 577 50 705
nqueens 5 120 5 120 50 75 50 562
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 172 50 620 50 745
protoboeuf-encode 5 180 5 201 50 327 50 823
rack 5 588 5 628 50 954 50 1062
ruby-json 5 84 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 35 5 37 50 23 50 28
30k_ifelse 5 28 5 28 50 214 50 206
30k_methods 5 38 5 38 50 482 50 476
cfunc_itself 5 347 5 329 50 1046 50 1145
fib 5 127 5 126 50 594 50 937
getivar 5 207 5 216 50 2259 50 2621
keyword_args 5 106 5 101 50 959 50 1134
object-new 5 320 5 310 50 404 50 379
respond_to 5 133 5 137 50 3260 50 3984
ruby-xor 5 240 5 247 50 803 50 1381
setivar 5 358 5 358 50 3123 50 5696
setivar_object 5 374 5 338 50 748 50 831
setivar_young 5 373 5 346 50 769 50 847
str_concat 5 402 5 393 50 969 50 1208
throw 5 1260 5 1260 50 1741 50 1687

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) 1440643 1250168 210 2207 0 0% 0 0 63.730873
chunky-png (click) 303536 275396 85 1127 1 0% 0 0 33.463501
erubi-rails (click) 1906229 1614113 259 2966 19 0% 0 0 80.606324
hexapdf (click) 1466780 1227527 596 13145 41 0% 0 0 380.328115
liquid-c (click) 468869 416332 115 1747 5 0% 0 0 48.719139
liquid-compile (click) 430061 401424 147 2085 2 0% 0 0 65.571357
liquid-render (click) 581674 537768 132 2315 8 0% 0 0 65.473451
lobsters (click) 8092741 6790176 3212 52303 169 0% 0 0 1788.462068
mail (click) 727254 683275 343 5321 14 0% 0 0 157.612717
psych-load (click) 273505 231998 62 620 3 0% 0 0 19.194058
railsbench (click) 3257192 2833196 1642 16194 52 0% 0 0 464.343197
rubocop (click) 5686591 4992704 2888 50517 110 0% 4 0 1500.038547
ruby-lsp (click) 846104 730999 306 4737 24 0% 0 0 133.342986
sequel (click) 440120 370605 12 97 0 0% 0 0 3.685005
binarytrees (click) 7424 6400 7 55 0 0% 0 0 2.350208
blurhash (click) 50449 51120 28 441 0 0% 0 0 14.29027
erubi (click) 254238 205661 6 100 0 0% 0 0 3.40013
etanni (click) 31129 29637 8 87 0 0% 0 0 2.988637
fannkuchredux (click) 23377 30267 4 252 0 0% 0 0 7.434187
fluentd (click) 341202 291675 8 96 0 0% 0 0 3.292664
graphql (click) 422832 379099 67 679 0 0% 0 0 21.330974
graphql-native (click) 394685 337462 38 258 0 0% 0 0 8.766522
lee (click) 285238 274593 46 749 0 0% 0 0 23.61075
loops-times (click) 7034 7662 6 74 0 0% 0 0 2.351141
matmul (click) 10988 3769 9 112 0 0% 0 0 3.618958
nbody (click) 13396 17343 7 175 0 0% 0 0 4.566998
nqueens (click) 20494 27605 6 242 0 0% 0 0 7.064684
optcarrot (click) 319427 243061 189 4402 34 0% 0 0 103.645937
protoboeuf (click) 151228 130005 13 1484 0 0% 0 0 42.183136
protoboeuf-encode (click) 221443 220595 15 1223 0 0% 0 0 31.196346
rack (click) 264184 232501 33 388 0 0% 0 0 10.219081
ruby-json (click) 25911 22980 9 181 0 0% 0 0 5.143994
rubykon (click) 136035 147112 138 1506 3 0% 0 0 43.130299
sudoku (click) 45866 41280 8 521 0 0% 0 0 15.400035
tinygql (click) 297777 252579 59 765 5 0% 0 0 21.917039
30k_ifelse (click) 5659135 5285109 9260 51671 0 0% 0 0 1423.809311
30k_methods (click) 2234900 1593140 5779 19354 0 0% 0 0 455.490383
cfunc_itself (click) 5461 4343 5 50 0 0% 0 0 1.516083
fib (click) 2930 3118 4 29 0 0% 0 0 1.170858
getivar (click) 3832 4970 4 54 0 0% 0 0 1.485798
keyword_args (click) 6651 5070 6 52 0 0% 0 0 1.811429
object-new (click) 2264 2350 3 25 0 0% 0 0 0.918983
respond_to (click) 6199 6484 5 65 0 0% 0 0 1.928498
ruby-xor (click) 5662 6266 5 67 0 0% 0 0 1.992107
setivar (click) 2983 3646 4 34 0 0% 0 0 1.099945
setivar_object (click) 3512 3794 4 36 0 0% 0 0 1.259577
setivar_young (click) 4222 4516 5 44 0 0% 0 0 1.46941
str_concat (click) 5800 6273 7 65 0 0% 0 0 2.084431
throw (click) 6179 4548 6 49 0 0% 0 0 1.712377

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.