YJIT Benchmarks

Details for Benchmarks at 2024-03-23 06:08:17 UTC

YJIT metrics from the yjit-bench suite using Ruby 2dbcc123f4

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 74.2% faster than CRuby 3.4.0dev
On railsbench it is
  • 79.6% 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 533 30 533
chunky-png 30 31 30 31
erubi-rails 30 20 30 20
hexapdf 30 15 30 15
liquid-c 30 349 30 349
liquid-compile 30 340 30 340
liquid-render 30 253 30 253
lobsters 30 23 30 23
mail 30 159 30 159
psych-load 30 15 30 15
railsbench 30 15 30 15
rubocop 30 185 30 185
ruby-lsp 30 206 30 206
sequel 30 286 30 286
binarytrees 30 84 30 84
blurhash 30 101 30 101
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 32 30 32
lee 30 19 30 19
matmul 30 18 30 18
nbody 30 330 30 330
nqueens 30 304 30 304
optcarrot 30 15 30 15
protoboeuf 30 447 30 447
rack 30 180 30 180
ruby-json 30 15 30 15
rubykon 30 15 30 15
sudoku 30 25 30 25
tinygql 30 42 30 42
30k_ifelse 30 55 30 55
30k_methods 30 24 30 24
cfunc_itself 30 827 30 827
fib 30 416 30 416
getivar 30 944 30 944
keyword_args 30 591 30 591
respond_to 30 1480 30 1480
ruby-xor 30 111 30 111
setivar 30 2392 30 2392
setivar_object 30 488 30 488
setivar_young 30 504 30 504
str_concat 30 424 30 424
throw 30 739 30 739

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) 884692 750180 49 522 0 0% 0 0 15.756604
chunky-png (click) 338152 291620 87 1093 1 0% 0 0 33.082363
erubi-rails (click) 1713499 1416850 279 2946 6 0% 0 0 87.005739
hexapdf (click) 1419508 1202563 596 12572 38 0% 0 0 374.631229
liquid-c (click) 524790 431507 119 1754 5 0% 0 0 47.979749
liquid-compile (click) 447847 390030 151 2065 2 0% 0 0 64.603321
liquid-render (click) 624105 549265 136 2280 8 0% 0 0 63.071491
lobsters (click) 7888913 6617407 3219 50116 73 0% 0 0 1724.686804
mail (click) 733001 627848 346 4847 14 0% 0 0 143.808064
psych-load (click) 301941 253685 65 655 3 0% 0 0 20.685313
railsbench (click) 2998890 2588796 1638 15761 54 0% 0 0 456.315223
rubocop (click) 5367364 4664374 2901 47773 106 0% 4 0 1440.425662
ruby-lsp (click) 634719 566134 159 2735 14 0% 0 0 77.852686
sequel (click) 499462 422484 16 115 0 0% 0 0 4.547481
binarytrees (click) 9392 7588 11 75 0 0% 0 0 3.09549
blurhash (click) 52005 47236 32 461 0 0% 0 0 15.59699
erubi (click) 271828 214258 10 111 0 0% 0 0 3.924029
etanni (click) 31211 27374 11 91 0 0% 0 0 3.051492
fannkuchredux (click) 24912 17701 9 257 0 0% 0 0 8.11115
fluentd (click) 388649 328268 11 111 0 0% 0 0 3.738954
graphql (click) 444836 374797 70 673 0 0% 0 0 20.892506
graphql-native (click) 410941 344818 42 276 0 0% 0 0 9.270799
lee (click) 316673 261419 49 732 0 0% 0 0 23.185938
matmul (click) 12586 12175 12 126 0 0% 0 0 4.245863
nbody (click) 15103 7574 11 185 0 0% 0 0 5.084495
nqueens (click) 23609 17866 10 261 0 0% 0 0 7.913512
optcarrot (click) 317102 278432 192 4342 34 0% 0 0 104.767432
protoboeuf (click) 159155 142916 17 1422 0 0% 0 0 44.52015
rack (click) 272701 234526 31 319 0 0% 0 0 9.252808
ruby-json (click) 28200 23070 12 198 0 0% 0 0 5.929245
rubykon (click) 135895 124742 143 1518 3 0% 0 0 43.352277
sudoku (click) 47017 45195 11 507 0 0% 0 0 15.684497
tinygql (click) 313454 265632 63 780 2 0% 0 0 23.217935
30k_ifelse (click) 5222597 4374236 9264 50813 0 0% 0 0 1465.838468
30k_methods (click) 2019614 1594052 5782 19369 0 0% 0 0 530.178094
cfunc_itself (click) 7589 5810 9 70 0 0% 0 0 2.305507
fib (click) 5017 4633 8 49 0 0% 0 0 1.833373
getivar (click) 6102 6023 8 74 0 0% 0 0 2.178206
keyword_args (click) 8472 6502 10 72 0 0% 0 0 2.540976
respond_to (click) 8341 7760 9 85 0 0% 0 0 2.69395
ruby-xor (click) 8110 7110 9 87 0 0% 0 0 3.222538
setivar (click) 5193 4604 8 54 0 0% 0 0 1.814513
setivar_object (click) 5561 4624 8 54 0 0% 0 0 1.878981
setivar_young (click) 6284 5274 9 62 0 0% 0 0 2.09758
str_concat (click) 7932 7204 11 85 0 0% 0 0 2.993507
throw (click) 7946 6065 10 69 0 0% 0 0 2.515364

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.