YJIT Benchmarks

Details for Benchmarks at 2024-04-25 19:08:13 UTC

YJIT metrics from the yjit-bench suite using Ruby af24ba4034

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 69.8% faster than CRuby 3.4.0dev
On railsbench it is
  • 78.4% 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 513 30 513
chunky-png 30 31 30 31
erubi-rails 30 19 30 19
hexapdf 30 15 30 15
liquid-c 30 335 30 335
liquid-compile 30 339 30 339
liquid-render 30 249 30 249
lobsters 30 23 30 23
mail 30 162 30 162
psych-load 30 15 30 15
railsbench 30 15 30 15
rubocop 30 179 30 179
ruby-lsp 30 175 30 175
sequel 30 288 30 288
binarytrees 30 84 30 84
blurhash 30 101 30 101
erubi 30 75 30 75
etanni 30 24 30 24
fannkuchredux 30 23 30 23
fluentd 30 15 30 15
graphql 30 15 30 15
graphql-native 30 32 30 32
lee 30 19 30 19
matmul 30 18 30 18
nbody 30 340 30 340
nqueens 30 310 30 310
optcarrot 30 15 30 15
protoboeuf 30 388 30 388
rack 30 178 30 178
ruby-json 30 15 30 15
rubykon 30 15 30 15
sudoku 30 25 30 25
tinygql 30 40 30 40
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 941 30 941
keyword_args 30 592 30 592
respond_to 30 1480 30 1480
ruby-xor 30 102 30 102
setivar 30 2390 30 2390
setivar_object 30 347 30 347
setivar_young 30 382 30 382
str_concat 30 426 30 426
throw 30 760 30 760

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) 877646 751418 49 526 0 0% 0 0 16.940407
chunky-png (click) 333979 282587 87 1094 1 0% 0 0 33.259683
erubi-rails (click) 1688205 1448413 277 2969 6 0% 0 0 85.473443
hexapdf (click) 1405745 1075437 597 12703 41 0% 0 0 380.409431
liquid-c (click) 516430 428443 119 1757 5 0% 0 0 49.744727
liquid-compile (click) 435190 354741 151 2067 2 0% 0 0 64.628291
liquid-render (click) 609429 487605 136 2292 8 0% 0 0 64.974001
lobsters (click) 7815546 6495159 3213 51315 89 0% 0 0 1760.109936
mail (click) 722577 606474 346 4865 14 0% 0 0 147.167621
psych-load (click) 298602 269073 65 658 3 0% 0 0 21.522089
railsbench (click) 2964435 2591571 1634 15956 57 0% 0 0 470.795234
rubocop (click) 5322438 4535601 2901 48296 109 0% 4 0 1469.816063
ruby-lsp (click) 624741 566882 159 2808 28 0% 0 0 79.823865
sequel (click) 490151 426596 16 118 0 0% 0 0 4.440458
binarytrees (click) 9300 8262 11 75 0 0% 0 0 3.009201
blurhash (click) 50973 43758 32 460 0 0% 0 0 16.113931
erubi (click) 268015 223860 10 112 0 0% 0 0 3.991245
etanni (click) 29692 28216 11 91 0 0% 0 0 3.022589
fannkuchredux (click) 23856 29309 9 257 0 0% 0 0 8.635865
fluentd (click) 374554 310418 11 111 0 0% 0 0 3.824597
graphql (click) 433877 351557 70 685 0 0% 0 0 21.557914
graphql-native (click) 401449 316171 42 278 0 0% 0 0 9.556848
lee (click) 313294 278323 49 737 0 0% 0 0 23.815716
matmul (click) 12453 4981 12 126 0 0% 0 0 4.519421
nbody (click) 14798 17933 11 185 0 0% 0 0 5.31648
nqueens (click) 22703 29059 10 260 0 0% 0 0 8.547585
optcarrot (click) 311581 267827 192 4326 34 0% 0 0 105.647073
protoboeuf (click) 148013 144784 17 1378 0 0% 0 0 43.063561
rack (click) 269930 214301 31 326 0 0% 0 0 9.81341
ruby-json (click) 32870 30395 12 196 0 0% 0 0 6.016629
rubykon (click) 132524 133452 143 1512 3 0% 0 0 43.820706
sudoku (click) 45463 61097 11 507 0 0% 0 0 16.00911
tinygql (click) 310457 273364 63 787 5 0% 0 0 23.812194
30k_ifelse (click) 5137861 4732461 9264 50813 0 0% 0 0 1523.430873
30k_methods (click) 2019563 1594382 5782 19369 0 0% 0 0 521.817817
cfunc_itself (click) 7534 6180 9 70 0 0% 0 0 2.7281
fib (click) 4970 5003 8 49 0 0% 0 0 2.31534
getivar (click) 5963 6375 8 74 0 0% 0 0 2.645499
keyword_args (click) 8409 6912 10 72 0 0% 0 0 3.007213
respond_to (click) 8277 8274 9 85 0 0% 0 0 3.203172
ruby-xor (click) 7891 7863 9 87 0 0% 0 0 3.143642
setivar (click) 5102 5375 8 54 0 0% 0 0 2.316289
setivar_object (click) 5470 5395 8 54 0 0% 0 0 2.309999
setivar_young (click) 6182 6093 9 62 0 0% 0 0 2.51459
str_concat (click) 7774 7946 11 85 0 0% 0 0 3.034256
throw (click) 7895 6377 10 69 0 0% 0 0 2.445146

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.