YJIT Benchmarks

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

YJIT metrics from the yjit-bench suite using Ruby e7262966c9

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 68.6% faster than CRuby 3.4.0dev
On railsbench it is
  • 71.9% 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 467 30 467
chunky-png 30 31 30 31
erubi-rails 30 15 30 15
hexapdf 30 15 30 15
liquid-c 30 347 30 347
liquid-compile 30 340 30 340
liquid-render 30 251 30 251
lobsters 30 23 30 23
mail 30 163 30 163
psych-load 30 15 30 15
railsbench 30 15 30 15
rubocop 30 178 30 178
ruby-lsp 30 178 30 178
sequel 30 293 30 293
binarytrees 30 83 30 83
blurhash 30 95 30 95
erubi 30 76 30 76
etanni 30 51 30 51
fannkuchredux 30 24 30 24
fluentd 30 15 30 15
graphql 30 15 30 15
graphql-native 30 32 30 32
lee 30 20 30 20
matmul 30 16 30 16
nbody 30 283 30 283
nqueens 30 281 30 281
optcarrot 30 15 30 15
rack 30 182 30 182
ruby-json 30 15 30 15
rubykon 30 15 30 15
sudoku 30 27 30 27
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 943 30 943
keyword_args 30 533 30 533
respond_to 30 1437 30 1437
setivar 30 1668 30 1668
setivar_object 30 344 30 344
setivar_young 30 377 30 377
str_concat 30 431 30 431
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) 854770 756694 49 534 0 0% 0 0 0 16.030873
chunky-png (click) 320053 271723 87 1106 1 0% 0 0 0 32.322613
erubi-rails (click) 1667219 1449923 280 2885 6 0% 0 0 0 79.59833
hexapdf (click) 1359002 1213091 596 12287 36 0% 0 0 0 358.630467
liquid-c (click) 504683 452619 119 1761 5 0% 0 0 0 48.301258
liquid-compile (click) 427136 358791 151 2059 2 0% 0 0 0 62.70631
liquid-render (click) 601894 532593 143 2267 8 0% 0 0 0 62.409826
lobsters (click) 7522142 6507435 3227 49787 73 0% 0 0 0 1650.923056
mail (click) 701869 621183 345 4827 12 0% 0 0 0 139.344156
psych-load (click) 282405 255611 65 649 3 0% 0 0 0 19.957047
railsbench (click) 2900713 2573961 1642 15373 54 0% 0 0 0 438.903706
rubocop (click) 4949280 4283950 2901 44270 99 0% 4 0 0 1318.755831
ruby-lsp (click) 618306 591211 159 2762 14 0% 0 0 0 76.961106
sequel (click) 474769 421530 16 118 0 0% 0 0 0 4.245239
binarytrees (click) 9291 8120 11 75 0 0% 0 0 0 2.94587
blurhash (click) 55111 50797 32 478 0 0% 0 0 0 15.887384
erubi (click) 255839 232242 10 114 0 0% 0 0 0 3.814668
etanni (click) 31947 30258 12 98 0 0% 0 0 0 3.355235
fannkuchredux (click) 24971 26731 9 259 0 0% 0 0 0 7.850048
fluentd (click) 361561 318055 11 111 0 0% 0 0 0 3.753592
graphql (click) 425900 383765 70 668 0 0% 0 0 0 20.59259
graphql-native (click) 393490 346518 42 273 0 0% 0 0 0 9.042603
lee (click) 299500 224036 49 734 0 0% 0 0 0 23.102929
matmul (click) 12823 4423 12 123 0 0% 0 0 0 4.226278
nbody (click) 18045 16846 11 187 0 0% 0 0 0 5.413078
nqueens (click) 21345 24174 10 229 0 0% 0 0 0 7.051822
optcarrot (click) 313426 304977 194 4318 34 0% 0 0 0 102.282022
rack (click) 254932 219486 31 322 0 0% 0 0 0 9.053604
ruby-json (click) 28225 25685 12 202 0 0% 0 0 0 6.117408
rubykon (click) 133517 97914 145 1518 3 0% 0 0 0 42.083686
sudoku (click) 46825 38098 11 507 0 0% 0 0 0 15.027702
tinygql (click) 295086 261171 63 792 5 0% 0 0 0 22.358703
30k_ifelse (click) 4909438 4374645 9264 50815 0 0% 0 0 0 1390.606563
30k_methods (click) 1850265 1594310 5782 19371 0 0% 0 0 0 492.130835
cfunc_itself (click) 7728 6775 9 72 0 0% 0 0 0 2.407502
fib (click) 5044 5012 8 49 0 0% 0 0 0 1.814019
getivar (click) 6179 6402 8 74 0 0% 0 0 0 2.307568
keyword_args (click) 8341 6984 10 74 0 0% 0 0 0 2.634885
respond_to (click) 8471 8395 9 87 0 0% 0 0 0 2.81848
setivar (click) 5330 4983 8 54 0 0% 0 0 0 1.951073
setivar_object (click) 5668 5003 8 54 0 0% 0 0 0 1.983527
setivar_young (click) 6435 5792 9 62 0 0% 0 0 0 2.245726
str_concat (click) 7993 7737 11 87 0 0% 0 0 0 2.849741
throw (click) 7723 6444 10 69 0 0% 0 0 0 2.342522

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.