YJIT Benchmarks

Details for Benchmarks at 2024-08-21 06:08:35 UTC

YJIT metrics from the yjit-bench suite using Ruby b41d79962a

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 75.2% faster than CRuby 3.4.0dev
  • 4.5% faster than YJIT 3.3.4
On railsbench it is
  • 78.7% faster than CRuby 3.4.0dev
  • the same speed as YJIT 3.3.4

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.4 warmups CRuby 3.3.4 iters CRuby 3.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.3.4 warmups YJIT 3.3.4 iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 10 49 10 48 10 118 10 119
chunky-png 10 18 10 18 10 35 10 41
erubi-rails 10 10 10 10 10 21 10 20
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 343 10 349 10 488 10 507
liquid-compile 10 345 10 341 10 501 10 527
liquid-render 10 137 10 136 10 357 10 368
lobsters 10 14 10 13 10 24 10 23
mail 10 159 10 156 10 234 10 228
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 130 10 236 10 237
ruby-lsp 10 130 10 125 10 185 10 218
sequel 10 316 10 319 10 441 10 429
binarytrees 10 51 10 49 10 118 10 109
blurhash 10 62 10 63 10 120 10 148
erubi 10 83 10 95 10 105 10 115
etanni 10 60 10 64 10 69 10 75
fannkuchredux 10 10 10 10 10 17 10 20
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 29 10 31 10 31 10 34
lee 10 11 10 11 10 20 10 21
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 213 10 421 10 512
nqueens 10 114 10 114 10 113 10 432
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 182 10 182 10 572 10 686
protoboeuf-encode 10 126 10 159 10 283 10 644
rack 10 459 10 476 10 845 10 937
ruby-json 10 10 10 10 10 10 10 10
rubykon 10 10 10 10 10 10 10 10
sudoku 10 10 10 10 10 28 10 33
tinygql 10 23 10 22 10 51 10 53
30k_ifelse 10 10 10 10 10 70 10 69
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 250 10 262 10 1108 10 1211
fib 10 102 10 102 10 616 10 618
getivar 10 214 10 228 10 1254 10 1735
keyword_args 10 85 10 87 10 729 10 946
object-new 10 224 10 215 10 309 10 276
respond_to 10 90 10 90 10 1785 10 2090
ruby-xor 10 30 10 31 10 92 10 171
setivar 10 348 10 404 10 2319 10 4867
setivar_object 10 216 10 244 10 536 10 607
setivar_young 10 216 10 246 10 528 10 602
str_concat 10 319 10 326 10 658 10 738
throw 10 971 10 889 10 1341 10 1173

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) 1357183 1256168 214 2169 0 0% 0 0 80.847373
chunky-png (click) 281688 242936 83 1054 1 0% 0 0 36.001709
erubi-rails (click) 1641123 1397259 275 2924 6 0% 0 0 101.807354
hexapdf (click) 1249194 1062338 505 11812 40 0% 0 0 410.711314
liquid-c (click) 466339 426227 119 1768 5 0% 0 0 57.643723
liquid-compile (click) 392076 366316 151 2087 2 0% 0 0 75.205136
liquid-render (click) 556679 452921 136 2323 8 0% 0 0 76.479767
lobsters (click) 7544634 6336510 3081 49780 81 0% 0 0 2236.660047
mail (click) 740620 727196 347 5563 14 0% 0 0 191.123862
psych-load (click) 248545 214861 61 592 3 0% 0 0 20.959258
railsbench (click) 2891947 2490257 1637 15973 57 0% 0 0 589.927124
rubocop (click) 5442935 4572741 2894 50965 114 0% 4 0 1929.430643
ruby-lsp (click) 808908 709762 309 4750 24 0% 0 0 159.208147
sequel (click) 428950 407917 16 116 0 0% 0 0 5.033572
binarytrees (click) 8404 7594 9 66 0 0% 0 0 3.007688
blurhash (click) 50094 43901 30 453 0 0% 0 0 17.696083
erubi (click) 225161 192976 10 112 0 0% 0 0 4.474701
etanni (click) 24958 23898 11 92 0 0% 0 0 3.557822
fannkuchredux (click) 23706 31291 4 252 0 0% 0 0 9.684047
fluentd (click) 324249 268984 4 28 0 0% 0 0 1.30333
graphql (click) 382059 328880 66 650 0 0% 0 0 22.737391
graphql-native (click) 347394 315531 41 273 0 0% 0 0 10.002161
lee (click) 243095 196723 34 531 0 0% 0 0 19.426104
matmul (click) 7957 8968 7 82 0 0% 0 0 3.212792
nbody (click) 15014 19017 10 191 0 0% 0 0 6.130713
nqueens (click) 23822 23823 9 279 0 0% 0 0 10.294421
optcarrot (click) 309010 266612 187 4398 34 0% 0 0 119.108132
protoboeuf (click) 139992 122036 16 1364 0 0% 0 0 48.677581
protoboeuf-encode (click) 212046 174944 18 1189 0 0% 0 0 36.676951
rack (click) 224457 201880 37 408 0 0% 0 0 12.993865
ruby-json (click) 24237 21549 7 166 0 0% 0 0 5.48007
rubykon (click) 128589 131709 136 1482 3 0% 0 0 48.18175
sudoku (click) 45292 24766 7 516 0 0% 0 0 19.080957
tinygql (click) 250820 234892 58 735 5 0% 0 0 24.61913
30k_ifelse (click) 5134313 4729205 9258 50774 0 0% 0 0 1897.606527
30k_methods (click) 2016559 1591611 5777 19335 0 0% 0 0 532.139858
cfunc_itself (click) 7172 6017 8 66 0 0% 0 0 2.343636
fib (click) 4609 4792 7 45 0 0% 0 0 1.861482
getivar (click) 5575 6644 7 70 0 0% 0 0 2.332471
keyword_args (click) 8042 6744 9 68 0 0% 0 0 2.637939
object-new (click) 4039 4024 6 41 0 0% 0 0 2.002888
respond_to (click) 7910 8158 8 81 0 0% 0 0 2.812732
ruby-xor (click) 5219 5772 4 58 0 0% 0 0 1.939695
setivar (click) 4726 5320 7 50 0 0% 0 0 1.872393
setivar_object (click) 5109 5228 7 50 0 0% 0 0 1.952272
setivar_young (click) 5819 5950 8 58 0 0% 0 0 2.197414
str_concat (click) 7415 7947 10 81 0 0% 0 0 3.178347
throw (click) 7538 6222 9 65 0 0% 0 0 2.622065

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.