YJIT Benchmarks

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

YJIT metrics from the yjit-bench suite using Ruby dc8fb7d97f

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 67.7% faster than CRuby 3.4.0dev
On railsbench it is
  • 73.5% 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 488 30 488
chunky-png 30 30 30 30
erubi-rails 30 15 30 15
hexapdf 30 15 30 15
liquid-c 30 351 30 351
liquid-compile 30 335 30 335
liquid-render 30 252 30 252
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 212 30 212
sequel 30 295 30 295
binarytrees 30 85 30 85
blurhash 30 96 30 96
erubi 30 74 30 74
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 20 30 20
matmul 30 16 30 16
nbody 30 284 30 284
nqueens 30 76 30 76
optcarrot 30 15 30 15
rack 30 178 30 178
ruby-json 30 15 30 15
rubykon 30 15 30 15
sudoku 30 26 30 26
tinygql 30 38 30 38
30k_ifelse 30 55 30 55
30k_methods 30 23 30 23
cfunc_itself 30 827 30 827
fib 30 417 30 417
getivar 30 943 30 943
keyword_args 30 533 30 533
respond_to 30 1435 30 1435
setivar 30 1668 30 1668
setivar_object 30 349 30 349
setivar_young 30 379 30 379
str_concat 30 395 30 395
throw 30 848 30 848

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) 780478 704449 48 525 3 0% 0 0 0 15.328055
chunky-png (click) 320952 289631 87 1106 1 0% 0 0 0 32.292482
erubi-rails (click) 1698368 1515755 287 2977 1 0% 0 0 0 83.817938
hexapdf (click) 1359518 1206062 596 12272 38 0% 0 0 0 357.887595
liquid-c (click) 506992 455948 119 1761 5 0% 0 0 0 47.859648
liquid-compile (click) 425021 382362 151 2037 2 0% 0 0 0 61.427368
liquid-render (click) 603614 551574 143 2267 8 0% 0 0 0 62.352882
lobsters (click) 7659165 6527892 3204 49547 76 0% 0 0 0 1651.175393
mail (click) 701531 604375 345 4827 12 0% 0 0 0 139.34916
psych-load (click) 283610 265639 65 651 3 0% 0 0 0 19.860701
railsbench (click) 2537854 2236058 1366 12877 16 0% 0 0 0 373.472576
rubocop (click) 4952364 4189606 2901 44283 99 0% 4 0 0 1318.622277
ruby-lsp (click) 632334 547468 159 2765 14 0% 0 0 0 77.413456
sequel (click) 474918 449938 16 121 0 0% 0 0 0 4.739917
binarytrees (click) 9291 8120 11 75 0 0% 0 0 0 2.949351
blurhash (click) 55111 50797 32 478 0 0% 0 0 0 15.938928
erubi (click) 255132 224361 10 114 0 0% 0 0 0 3.899423
etanni (click) 31947 30258 12 98 0 0% 0 0 0 3.300346
fannkuchredux (click) 24971 26731 9 259 0 0% 0 0 0 7.863841
fluentd (click) 363505 288018 11 111 0 0% 0 0 0 3.586702
graphql (click) 427305 393798 70 668 0 0% 0 0 0 20.394185
graphql-native (click) 393826 346775 42 273 0 0% 0 0 0 9.043573
lee (click) 301314 267606 49 734 0 0% 0 0 0 23.130463
matmul (click) 12823 4423 12 123 0 0% 0 0 0 4.212363
nbody (click) 18045 16846 11 187 0 0% 0 0 0 5.477405
nqueens (click) 21345 24174 10 229 0 0% 0 0 0 7.016208
optcarrot (click) 313426 304977 194 4318 34 0% 0 0 0 101.748116
rack (click) 256746 238492 31 322 0 0% 0 0 0 9.166788
ruby-json (click) 28225 25685 12 202 0 0% 0 0 0 6.150481
rubykon (click) 132372 104985 145 1506 3 0% 0 0 0 41.822017
sudoku (click) 46825 38098 11 507 0 0% 0 0 0 14.982951
tinygql (click) 294912 252654 63 792 5 0% 0 0 0 22.336055
30k_ifelse (click) 4909438 4374645 9264 50815 0 0% 0 0 0 1369.777541
30k_methods (click) 1850265 1594310 5782 19371 0 0% 0 0 0 490.668592
cfunc_itself (click) 7728 6775 9 72 0 0% 0 0 0 2.426347
fib (click) 5044 5012 8 49 0 0% 0 0 0 1.923843
getivar (click) 6179 6402 8 74 0 0% 0 0 0 2.283708
keyword_args (click) 8341 6984 10 74 0 0% 0 0 0 2.659546
respond_to (click) 8471 8395 9 87 0 0% 0 0 0 2.828834
setivar (click) 5330 4983 8 54 0 0% 0 0 0 1.975478
setivar_object (click) 5668 5003 8 54 0 0% 0 0 0 1.983106
setivar_young (click) 6435 5792 9 62 0 0% 0 0 0 2.250371
str_concat (click) 7993 7737 11 87 0 0% 0 0 0 2.865763
throw (click) 7723 6444 10 69 0 0% 0 0 0 2.333896

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.