YJIT Benchmarks

Details for Benchmarks at 2024-11-24 03:48:55 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 91.3% faster than CRuby 3.4.0dev
  • 5.6% faster than YJIT 3.3.6
On railsbench it is
  • 95.9% faster than CRuby 3.4.0dev
  • 2.8% faster than YJIT 3.3.6
x86_64 runtime: 3 hours, 44 minutes
aarch64 runtime: 3 hours, 12 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 81 5 83 50 156 50 162
chunky-png 5 31 5 32 50 15 50 34
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 412 5 421 50 569 50 622
liquid-compile 5 409 5 406 50 545 50 558
liquid-render 5 171 5 169 50 405 50 427
lobsters 5 20 5 20 50 10 50 10
mail 5 189 5 187 50 239 50 252
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 154 50 249 50 262
ruby-lsp 5 157 5 141 50 234 50 242
sequel 5 418 5 407 50 575 50 593
binarytrees 5 84 5 83 50 144 50 151
blurhash 5 82 5 81 50 127 50 145
erubi 5 115 5 140 50 88 50 148
etanni 5 91 5 100 50 54 50 70
fannkuchredux 5 52 5 55 50 101 50 108
fluentd 5 63 5 63 50 26 50 30
graphql 5 84 5 85 50 56 50 58
graphql-native 5 49 5 54 50 11 50 16
lee 5 22 5 23 50 10 50 10
matmul 5 51 5 48 50 84 50 99
nbody 5 244 5 248 50 577 50 716
nqueens 5 120 5 119 50 75 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 179 5 175 50 620 50 743
protoboeuf-encode 5 179 5 201 50 326 50 821
rack 5 571 5 635 50 954 50 1073
ruby-json 5 83 5 84 50 49 50 51
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 164 50 171
tinygql 5 36 5 37 50 22 50 27
30k_ifelse 5 28 5 28 50 215 50 194
30k_methods 5 38 5 38 50 484 50 475
cfunc_itself 5 341 5 354 50 1046 50 1136
fib 5 126 5 126 50 901 50 963
getivar 5 207 5 214 50 2267 50 2614
keyword_args 5 105 5 108 50 959 50 1231
object-new 5 321 5 319 50 404 50 398
respond_to 5 133 5 139 50 3254 50 4040
ruby-xor 5 241 5 246 50 803 50 1380
setivar 5 358 5 357 50 3124 50 5708
setivar_object 5 374 5 341 50 780 50 843
setivar_young 5 373 5 343 50 767 50 862
str_concat 5 401 5 396 50 959 50 1168
throw 5 1258 5 1323 50 1733 50 1730

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) 1462495 1256164 213 2351 0 0% 0 0 68.371607
chunky-png (click) 341288 279046 88 1225 17 1% 0 0 36.320956
erubi-rails (click) 1975272 1688005 264 3053 19 0% 0 0 84.645519
hexapdf (click) 1493655 1301454 600 13946 169 1% 0 0 396.718039
liquid-c (click) 524198 460052 119 1852 5 0% 0 0 52.780551
liquid-compile (click) 415748 344738 150 2219 2 0% 0 0 69.068858
liquid-render (click) 604487 494885 136 2474 12 0% 0 0 69.789831
lobsters (click) 8408941 7081941 3214 54851 188 0% 0 0 1844.026967
mail (click) 790699 716483 347 5588 57 1% 0 0 161.162008
psych-load (click) 253203 225365 65 661 17 2% 0 0 20.80945
railsbench (click) 3384746 2872268 1646 17010 52 0% 0 0 517.828929
rubocop (click) 5856590 5036201 2891 52445 110 0% 4 0 1553.301147
ruby-lsp (click) 892417 779425 309 5005 26 0% 0 0 142.991781
sequel (click) 472476 405340 16 126 56 44% 0 0 4.824952
binarytrees (click) 14303 12795 14 125 0 0% 1 0 4.530437
blurhash (click) 58305 50994 31 515 1 0% 0 0 16.773213
erubi (click) 259758 220315 8 113 0 0% 0 0 3.942183
etanni (click) 32243 30528 9 94 0 0% 0 0 3.227752
fannkuchredux (click) 28719 35080 11 307 0 0% 1 0 9.246037
fluentd (click) 348136 297679 10 109 0 0% 0 0 3.855621
graphql (click) 408980 354160 69 695 0 0% 0 0 21.802696
graphql-native (click) 407361 368315 40 270 0 0% 0 0 9.138093
lee (click) 286561 247094 49 848 17 2% 0 0 26.35065
matmul (click) 16519 8883 16 169 4 2% 1 0 5.454689
nbody (click) 19555 23574 14 246 0 0% 1 0 6.559668
nqueens (click) 25836 32550 13 297 4 1% 1 0 8.744523
optcarrot (click) 331857 315992 195 4591 38 0% 1 0 108.096749
protoboeuf (click) 167305 158566 19 1652 0 0% 1 0 46.955391
protoboeuf-encode (click) 234990 231148 17 1255 0 0% 0 0 32.341103
rack (click) 272150 249745 37 424 16 3% 0 0 11.351556
ruby-json (click) 21296 18539 10 187 0 0% 0 0 5.37539
rubykon (click) 146229 126207 144 1628 7 0% 1 0 46.641299
sudoku (click) 48458 36262 10 544 7 1% 0 0 16.345515
tinygql (click) 268620 214520 62 795 20 2% 0 0 22.564414
30k_ifelse (click) 6316834 5792957 9263 56487 0 0% 0 0 1547.877332
30k_methods (click) 2240242 1597953 5786 19409 0 0% 1 0 451.254501
cfunc_itself (click) 11593 9808 13 112 0 0% 1 0 3.53587
fib (click) 8722 8374 11 87 0 0% 1 0 3.047626
getivar (click) 6206 7266 8 78 0 0% 0 0 2.444153
keyword_args (click) 8811 7279 9 74 0 0% 0 0 2.584905
object-new (click) 8145 7709 11 85 1 1% 1 0 2.885945
respond_to (click) 13998 6288 12 145 0 0% 1 0 4.25148
ruby-xor (click) 10978 11066 12 122 2 1% 1 0 3.776582
setivar (click) 5357 5942 8 58 0 0% 0 0 2.094162
setivar_object (click) 9398 9092 12 96 0 0% 1 0 3.213432
setivar_young (click) 10108 9814 13 104 0 0% 1 0 3.450481
str_concat (click) 12327 12217 15 131 3 2% 1 0 4.246557
throw (click) 12065 9846 14 109 0 0% 1 0 3.720097

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.