YJIT Benchmarks

Details for Benchmarks at 2024-11-18 03:48:19 UTC

YJIT metrics from the yjit-bench suite using Ruby 62007415c4

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 88.9% faster than CRuby 3.4.0dev
  • 4.1% faster than YJIT 3.3.4
On railsbench it is
  • 99.4% faster than CRuby 3.4.0dev
  • 4.1% faster than 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 5 83 5 83 50 155 50 162
chunky-png 5 31 5 32 50 15 50 35
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 415 50 595 50 610
liquid-compile 5 424 5 411 50 540 50 591
liquid-render 5 168 5 170 50 405 50 416
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 193 50 251 50 244
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 251 50 261
ruby-lsp 5 157 5 152 50 255 50 242
sequel 5 430 5 420 50 572 50 565
binarytrees 5 84 5 84 50 146 50 153
blurhash 5 82 5 82 50 127 50 144
erubi 5 114 5 149 50 41 50 138
etanni 5 90 5 98 50 52 50 70
fannkuchredux 5 52 5 55 50 100 50 109
fluentd 5 61 5 61 50 22 50 23
graphql 5 85 5 84 50 57 50 58
graphql-native 5 50 5 54 50 10 50 15
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 48 50 88 50 99
nbody 5 248 5 248 50 597 50 716
nqueens 5 117 5 116 50 74 50 558
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 175 50 616 50 726
protoboeuf-encode 5 178 5 199 50 327 50 833
rack 5 582 5 632 50 947 50 1089
ruby-json 5 85 5 84 50 50 50 50
rubykon 5 20 5 21 50 10 50 10
sudoku 5 48 5 48 50 163 50 162
tinygql 5 37 5 36 50 24 50 27
30k_ifelse 5 28 5 28 50 213 50 193
30k_methods 5 38 5 38 50 482 50 478
cfunc_itself 5 340 5 339 50 1046 50 1136
fib 5 127 5 126 50 901 50 963
getivar 5 209 5 220 50 2272 50 2626
keyword_args 5 105 5 103 50 959 50 1231
object-new 5 321 5 319 50 406 50 389
respond_to 5 137 5 138 50 3258 50 4027
ruby-xor 5 241 5 248 50 803 50 1381
setivar 5 360 5 359 50 3123 50 5702
setivar_object 5 375 5 348 50 775 50 847
setivar_young 5 373 5 343 50 771 50 847
str_concat 5 397 5 382 50 989 50 1201
throw 5 1272 5 1330 50 1725 50 1755

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) 1465111 1206766 213 2351 0 0% 0 0 68.617518
chunky-png (click) 305635 247184 87 1217 1 0% 0 0 36.580774
erubi-rails (click) 1960415 1714196 263 3040 19 0% 0 0 83.068773
hexapdf (click) 1504284 1263228 599 13943 41 0% 0 0 398.330525
liquid-c (click) 488496 438078 119 1852 5 0% 0 0 51.81502
liquid-compile (click) 447860 420867 150 2230 2 0% 0 0 70.116085
liquid-render (click) 600439 524285 136 2474 12 0% 0 0 69.890272
lobsters (click) 8415622 7100884 3215 54790 190 0% 0 0 1930.763294
mail (click) 790300 738922 346 5581 16 0% 0 0 161.151795
psych-load (click) 258251 216091 64 656 3 0% 0 0 20.470634
railsbench (click) 3359580 2891134 1646 16990 52 0% 0 0 497.322031
rubocop (click) 5862768 5079789 2891 52444 110 0% 4 0 1539.478414
ruby-lsp (click) 893088 780045 309 5005 26 0% 0 0 141.60359
sequel (click) 474459 408044 15 125 0 0% 0 0 4.683326
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.021706
blurhash (click) 57136 49713 29 501 0 0% 0 0 16.118307
erubi (click) 232606 205283 8 113 0 0% 0 0 3.772684
etanni (click) 32243 30528 9 94 0 0% 0 0 3.193281
fannkuchredux (click) 24038 30826 5 257 0 0% 0 0 7.596725
fluentd (click) 355049 280473 10 109 0 0% 0 0 3.717946
graphql (click) 412582 328800 69 695 0 0% 0 0 20.477284
graphql-native (click) 383286 355420 40 270 0 0% 0 0 8.569155
lee (click) 316789 255416 48 841 0 0% 0 0 26.034141
matmul (click) 11838 4563 10 119 0 0% 0 0 3.934034
nbody (click) 14884 19325 8 196 0 0% 0 0 5.120996
nqueens (click) 21155 28164 7 247 0 0% 0 0 7.157311
optcarrot (click) 327944 312320 190 4549 34 0% 0 0 103.848509
protoboeuf (click) 163392 155036 14 1610 0 0% 0 0 45.988355
protoboeuf-encode (click) 234584 230620 16 1249 0 0% 0 0 31.961721
rack (click) 236557 203015 36 417 0 0% 0 0 11.148938
ruby-json (click) 27622 24398 11 192 0 0% 0 0 5.546376
rubykon (click) 142198 122470 139 1584 3 0% 0 0 45.197379
sudoku (click) 48052 35463 9 538 0 0% 0 0 16.120064
tinygql (click) 302670 250220 61 787 5 0% 0 0 22.681253
30k_ifelse (click) 6315665 5791705 9261 56473 0 0% 0 0 1558.483969
30k_methods (click) 2235566 1593704 5780 19359 0 0% 0 0 452.254126
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 1.950697
fib (click) 4041 4120 5 37 0 0% 0 0 1.40991
getivar (click) 5037 6014 6 64 0 0% 0 0 1.907511
keyword_args (click) 7637 6022 7 60 0 0% 0 0 2.046435
object-new (click) 3469 3394 5 35 0 0% 0 0 1.339735
respond_to (click) 9322 2039 6 95 0 0% 0 0 2.781524
ruby-xor (click) 6297 6740 6 72 0 0% 0 0 2.187871
setivar (click) 4188 4690 6 44 0 0% 0 0 1.567341
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.630612
setivar_young (click) 5427 5560 7 54 0 0% 0 0 1.878481
str_concat (click) 7646 7893 9 81 0 0% 0 0 2.673711
throw (click) 7384 5592 8 59 0 0% 0 0 2.165712

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.