YJIT Benchmarks

Details for Benchmarks at 2024-01-15 19:08:17 UTC

YJIT metrics from the yjit-bench suite using Ruby cc7b19e048

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 63.7% faster than CRuby 3.4.0dev
On railsbench it is
  • 65.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 477 30 477
chunky-png 30 30 30 30
erubi-rails 30 15 30 15
hexapdf 30 15 30 15
liquid-c 30 345 30 345
liquid-compile 30 338 30 338
liquid-render 30 244 30 244
lobsters 30 23 30 23
mail 30 163 30 163
psych-load 30 15 30 15
railsbench 30 15 30 15
ruby-lsp 30 390 30 390
sequel 30 302 30 302
binarytrees 30 85 30 85
erubi 30 77 30 77
etanni 30 51 30 51
fannkuchredux 30 23 30 23
fluentd 30 15 30 15
graphql 30 15 30 15
graphql-native 30 33 30 33
lee 30 19 30 19
matmul 30 16 30 16
nbody 30 275 30 275
nqueens 30 262 30 262
optcarrot 30 15 30 15
rack 30 180 30 180
ruby-json 30 15 30 15
rubykon 30 15 30 15
sudoku 30 24 30 24
tinygql 30 42 30 42
30k_ifelse 30 55 30 55
30k_methods 30 24 30 24
cfunc_itself 30 752 30 752
fib 30 417 30 417
getivar 30 937 30 937
keyword_args 30 492 30 492
respond_to 30 1171 30 1171
setivar 30 1668 30 1668
setivar_object 30 472 30 472
setivar_young 30 471 30 471
str_concat 30 448 30 448
throw 30 841 30 841

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) 734653 634426 50 509 3 0% 0 0 0 15.033861
chunky-png (click) 306382 268644 87 1098 1 0% 0 0 0 32.823682
erubi-rails (click) 1609984 1406984 287 2912 1 0% 0 0 0 82.291153
hexapdf (click) 1334814 1153716 599 12128 36 0% 0 0 0 354.483707
liquid-c (click) 486524 452900 120 1703 5 0% 0 0 0 47.263769
liquid-compile (click) 348721 267593 150 2021 2 0% 0 0 0 61.700071
liquid-render (click) 520042 388012 143 2163 5 0% 0 0 0 60.346708
lobsters (click) 7415689 6439551 3183 48316 64 0% 0 0 0 1618.557346
mail (click) 683194 596465 345 4769 12 0% 0 0 0 140.97388
psych-load (click) 261089 211910 65 602 3 0% 0 0 0 18.865072
railsbench (click) 2458738 2135504 1357 12415 16 0% 0 0 0 363.509125
ruby-lsp (click) 5308311 4617019 3394 49786 398 0% 4 0 0 1523.530753
sequel (click) 453897 405516 16 117 0 0% 0 0 0 4.12774
binarytrees (click) 9306 8120 11 75 0 0% 0 0 0 2.956394
erubi (click) 232976 229256 10 97 0 0% 0 0 0 3.307852
etanni (click) 32254 22475 12 92 0 0% 0 0 0 3.112768
fannkuchredux (click) 22749 23446 9 235 0 0% 0 0 0 7.171536
fluentd (click) 332166 282570 12 104 0 0% 0 0 0 3.360571
graphql (click) 396848 350657 70 657 0 0% 0 0 0 20.068728
graphql-native (click) 362715 327545 42 263 0 0% 0 0 0 8.697548
lee (click) 281180 250100 49 691 0 0% 0 0 0 21.813864
matmul (click) 12919 12854 12 124 0 0% 0 0 0 4.189535
nbody (click) 18474 17501 11 191 0 0% 0 0 0 5.625218
nqueens (click) 19862 5821 10 208 0 0% 0 0 0 6.479796
optcarrot (click) 314821 260455 194 4244 32 0% 0 0 0 100.362405
rack (click) 239060 206189 31 304 0 0% 0 0 0 8.937578
ruby-json (click) 27979 25354 12 205 0 0% 0 0 0 6.274194
rubykon (click) 130746 111951 144 1490 3 0% 0 0 0 41.915006
sudoku (click) 46943 31883 10 515 0 0% 0 0 0 15.448019
tinygql (click) 277195 244735 63 772 5 0% 0 0 0 22.156129
30k_ifelse (click) 4909835 4375023 9264 50819 0 0% 0 0 0 1386.434969
30k_methods (click) 1850542 1594540 5782 19373 0 0% 0 0 0 491.665289
cfunc_itself (click) 7728 6775 9 72 0 0% 0 0 0 2.32111
fib (click) 5044 5012 8 49 0 0% 0 0 0 1.757197
getivar (click) 6179 6402 8 74 0 0% 0 0 0 2.223015
keyword_args (click) 8341 6984 10 74 0 0% 0 0 0 2.492868
respond_to (click) 8471 8395 9 87 0 0% 0 0 0 2.716572
setivar (click) 5330 4983 8 54 0 0% 0 0 0 1.791973
setivar_object (click) 5668 5003 8 54 0 0% 0 0 0 1.845919
setivar_young (click) 6435 5792 9 62 0 0% 0 0 0 2.084112
str_concat (click) 8275 7972 11 89 0 0% 0 0 0 2.836928
throw (click) 7723 6444 10 69 0 0% 0 0 0 2.332264

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.