YJIT Benchmarks

Details for Benchmarks at 2024-04-17 19:08:17 UTC

YJIT metrics from the yjit-bench suite using Ruby 4cc58ea0b8

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 71.6% faster than CRuby 3.4.0dev
On railsbench it is
  • 77.7% faster than CRuby 3.4.0dev

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.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 30 523 30 523
chunky-png 30 32 30 32
erubi-rails 30 20 30 20
hexapdf 30 15 30 15
liquid-c 30 349 30 349
liquid-compile 30 358 30 358
liquid-render 30 254 30 254
lobsters 30 23 30 23
mail 30 164 30 164
psych-load 30 15 30 15
railsbench 30 15 30 15
rubocop 30 184 30 184
ruby-lsp 30 207 30 207
sequel 30 289 30 289
binarytrees 30 86 30 86
blurhash 30 100 30 100
erubi 30 76 30 76
etanni 30 24 30 24
fannkuchredux 30 23 30 23
fluentd 30 15 30 15
graphql 30 15 30 15
graphql-native 30 33 30 33
lee 30 20 30 20
matmul 30 18 30 18
nbody 30 311 30 311
nqueens 30 314 30 314
optcarrot 30 15 30 15
protoboeuf 30 393 30 393
rack 30 180 30 180
ruby-json 30 15 30 15
rubykon 30 15 30 15
sudoku 30 26 30 26
tinygql 30 41 30 41
30k_ifelse 30 55 30 55
30k_methods 30 23 30 23
cfunc_itself 30 827 30 827
fib 30 416 30 416
getivar 30 945 30 945
keyword_args 30 591 30 591
respond_to 30 1480 30 1480
ruby-xor 30 96 30 96
setivar 30 2392 30 2392
setivar_object 30 385 30 385
setivar_young 30 413 30 413
str_concat 30 414 30 414
throw 30 763 30 763

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) 878133 751539 49 526 0 0% 0 0 16.997132
chunky-png (click) 333979 258011 87 1094 1 0% 0 0 33.106089
erubi-rails (click) 1691294 1469780 276 2942 6 0% 0 0 85.091018
hexapdf (click) 1408107 1141285 597 12713 41 0% 0 0 381.509902
liquid-c (click) 516808 404212 119 1757 5 0% 0 0 50.291782
liquid-compile (click) 441323 385216 151 2075 2 0% 0 0 66.263531
liquid-render (click) 615024 541739 136 2292 8 0% 0 0 65.135946
lobsters (click) 7817943 6574587 3212 51220 89 0% 0 0 1761.127561
mail (click) 722559 622696 346 4865 14 0% 0 0 147.909032
psych-load (click) 298270 268834 65 656 3 0% 0 0 21.209396
railsbench (click) 2968862 2539489 1634 15926 57 0% 0 0 470.325237
rubocop (click) 5316353 4734570 2901 48248 109 0% 4 0 1478.707261
ruby-lsp (click) 624761 558731 159 2809 28 0% 0 0 81.568032
sequel (click) 490835 427168 16 118 0 0% 0 0 4.549525
binarytrees (click) 9300 8262 11 75 0 0% 0 0 3.063688
blurhash (click) 50973 43758 32 460 0 0% 0 0 16.335275
erubi (click) 268015 223860 10 112 0 0% 0 0 3.98639
etanni (click) 29692 28216 11 91 0 0% 0 0 3.054135
fannkuchredux (click) 23856 29309 9 257 0 0% 0 0 8.601706
fluentd (click) 383973 349293 11 111 0 0% 0 0 3.725328
graphql (click) 436081 343792 70 685 0 0% 0 0 21.690068
graphql-native (click) 404100 324998 42 278 0 0% 0 0 9.617876
lee (click) 313294 278323 49 737 0 0% 0 0 23.950012
matmul (click) 12453 4981 12 126 0 0% 0 0 4.468335
nbody (click) 14798 17933 11 185 0 0% 0 0 5.337608
nqueens (click) 22703 29059 10 260 0 0% 0 0 8.631085
optcarrot (click) 311581 267827 192 4326 34 0% 0 0 105.261215
protoboeuf (click) 148013 144784 17 1378 0 0% 0 0 43.361776
rack (click) 269664 213977 31 323 0 0% 0 0 9.604966
ruby-json (click) 32870 30395 12 196 0 0% 0 0 5.965448
rubykon (click) 131584 107832 143 1503 3 0% 0 0 44.511752
sudoku (click) 45463 61097 11 507 0 0% 0 0 16.244611
tinygql (click) 310457 273364 63 787 5 0% 0 0 23.92605
30k_ifelse (click) 5137861 4732461 9264 50813 0 0% 0 0 1532.508223
30k_methods (click) 2019563 1594382 5782 19369 0 0% 0 0 531.323453
cfunc_itself (click) 7534 6180 9 70 0 0% 0 0 2.766185
fib (click) 4970 5003 8 49 0 0% 0 0 2.30711
getivar (click) 5963 6375 8 74 0 0% 0 0 2.36096
keyword_args (click) 8409 6912 10 72 0 0% 0 0 3.059432
respond_to (click) 8277 8274 9 85 0 0% 0 0 3.238317
ruby-xor (click) 7891 7863 9 87 0 0% 0 0 2.908031
setivar (click) 5102 5375 8 54 0 0% 0 0 2.299619
setivar_object (click) 5470 5395 8 54 0 0% 0 0 2.002304
setivar_young (click) 6182 6093 9 62 0 0% 0 0 2.196863
str_concat (click) 7774 7946 11 85 0 0% 0 0 3.012841
throw (click) 7895 6377 10 69 0 0% 0 0 2.492594

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.