YJIT Benchmarks

Details for Benchmarks at 2024-02-09 06:08:12 UTC

YJIT metrics from the yjit-bench suite using Ruby 007c75ce4c

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
  • 67.8% 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 485 30 485
chunky-png 30 31 30 31
erubi-rails 30 19 30 19
hexapdf 30 15 30 15
liquid-c 30 349 30 349
liquid-compile 30 335 30 335
liquid-render 30 249 30 249
lobsters 30 22 30 22
mail 30 164 30 164
psych-load 30 15 30 15
railsbench 30 15 30 15
rubocop 30 178 30 178
ruby-lsp 30 213 30 213
sequel 30 287 30 287
binarytrees 30 84 30 84
blurhash 30 99 30 99
erubi 30 77 30 77
etanni 30 52 30 52
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 18 30 18
nbody 30 314 30 314
nqueens 30 307 30 307
optcarrot 30 15 30 15
rack 30 179 30 179
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 826 30 826
fib 30 417 30 417
getivar 30 936 30 936
keyword_args 30 531 30 531
respond_to 30 1457 30 1457
ruby-xor 30 84 30 84
setivar 30 1669 30 1669
setivar_object 30 292 30 292
setivar_young 30 331 30 331
str_concat 30 426 30 426
throw 30 835 30 835

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) 857973 722136 49 520 0 0% 0 0 0 16.182625
chunky-png (click) 328738 282765 87 1109 1 0% 0 0 0 32.845212
erubi-rails (click) 1656710 1473192 280 2904 6 0% 0 0 0 82.444682
hexapdf (click) 1373476 1098256 597 12534 37 0% 0 0 0 365.908304
liquid-c (click) 510008 467822 119 1756 5 0% 0 0 0 48.058243
liquid-compile (click) 433505 399821 151 2055 2 0% 0 0 0 62.681991
liquid-render (click) 606985 546535 143 2263 8 0% 0 0 0 63.085091
lobsters (click) 7532452 6502406 3223 50063 72 0% 0 0 0 1677.210321
mail (click) 709501 613833 345 4842 14 0% 0 0 0 141.391585
psych-load (click) 290597 249405 65 651 3 0% 0 0 0 20.220648
railsbench (click) 2904182 2488604 1642 15587 54 0% 0 0 0 443.780763
rubocop (click) 4940817 4232449 2901 44424 99 0% 4 0 0 1327.917108
ruby-lsp (click) 625395 523925 159 2783 14 0% 0 0 0 78.475274
sequel (click) 479351 423373 16 118 0 0% 0 0 0 4.249267
binarytrees (click) 9143 8108 11 75 0 0% 0 0 0 2.998945
blurhash (click) 51313 49807 32 478 0 0% 0 0 0 15.639005
erubi (click) 263591 234529 10 114 0 0% 0 0 0 3.857812
etanni (click) 31538 30138 12 98 0 0% 0 0 0 3.337521
fannkuchredux (click) 24859 26640 9 259 0 0% 0 0 0 7.881176
fluentd (click) 377750 297800 11 111 0 0% 0 0 0 3.611165
graphql (click) 428858 376983 70 668 0 0% 0 0 0 20.589062
graphql-native (click) 395312 362710 42 273 0 0% 0 0 0 9.292346
lee (click) 303366 250857 49 735 0 0% 0 0 0 23.040838
matmul (click) 12467 4614 12 126 0 0% 0 0 0 4.310268
nbody (click) 15071 8084 11 187 0 0% 0 0 0 4.966324
nqueens (click) 23554 27064 10 263 0 0% 0 0 0 7.849768
optcarrot (click) 312921 264580 194 4346 34 0% 0 0 0 103.509417
rack (click) 264116 239537 31 322 0 0% 0 0 0 9.344848
ruby-json (click) 27885 25578 12 202 0 0% 0 0 0 6.141738
rubykon (click) 130555 101725 145 1504 3 0% 0 0 0 41.72519
sudoku (click) 46746 38099 11 507 0 0% 0 0 0 15.54748
tinygql (click) 302312 278447 63 792 5 0% 0 0 0 22.739933
30k_ifelse (click) 4909277 4374613 9264 50815 0 0% 0 0 0 1413.379897
30k_methods (click) 1850173 1594291 5782 19371 0 0% 0 0 0 498.87996
cfunc_itself (click) 7567 6743 9 72 0 0% 0 0 0 2.375506
fib (click) 4896 5000 8 49 0 0% 0 0 0 1.84278
getivar (click) 6031 6390 8 74 0 0% 0 0 0 2.255134
keyword_args (click) 8175 6947 10 74 0 0% 0 0 0 2.563624
respond_to (click) 8310 8363 9 87 0 0% 0 0 0 2.715102
ruby-xor (click) 7480 7262 9 81 0 0% 0 0 0 2.624414
setivar (click) 5182 4971 8 54 0 0% 0 0 0 1.760157
setivar_object (click) 5520 4991 8 54 0 0% 0 0 0 1.839123
setivar_young (click) 6269 5689 9 62 0 0% 0 0 0 2.069424
str_concat (click) 7832 7705 11 87 0 0% 0 0 0 2.944879
throw (click) 7575 6432 10 69 0 0% 0 0 0 2.366532

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.