YJIT Benchmarks

Details for Benchmarks at 2024-02-09 19:08:14 UTC

YJIT metrics from the yjit-bench suite using Ruby 717adb564b

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 68.3% faster than CRuby 3.4.0dev
On railsbench it is
  • 68.0% 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 481 30 481
chunky-png 30 31 30 31
erubi-rails 30 19 30 19
hexapdf 30 15 30 15
liquid-c 30 350 30 350
liquid-compile 30 339 30 339
liquid-render 30 253 30 253
lobsters 30 22 30 22
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 292 30 292
binarytrees 30 84 30 84
blurhash 30 98 30 98
erubi 30 76 30 76
etanni 30 51 30 51
fannkuchredux 30 23 30 23
fluentd 30 15 30 15
graphql 30 15 30 15
graphql-native 30 32 30 32
lee 30 20 30 20
matmul 30 17 30 17
nbody 30 313 30 313
nqueens 30 300 30 300
optcarrot 30 15 30 15
rack 30 184 30 184
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 23 30 23
cfunc_itself 30 826 30 826
fib 30 416 30 416
getivar 30 945 30 945
keyword_args 30 531 30 531
respond_to 30 1459 30 1459
ruby-xor 30 93 30 93
setivar 30 1668 30 1668
setivar_object 30 390 30 390
setivar_young 30 362 30 362
str_concat 30 399 30 399
throw 30 809 30 809

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 722064 49 520 0 0% 0 0 0 15.471532
chunky-png (click) 327935 282066 87 1104 1 0% 0 0 0 32.350735
erubi-rails (click) 1653735 1478881 281 2882 6 0% 0 0 0 79.80965
hexapdf (click) 1374711 1115613 598 12548 37 0% 0 0 0 365.555704
liquid-c (click) 509774 451203 119 1756 5 0% 0 0 0 47.41204
liquid-compile (click) 433993 400368 151 2062 2 0% 0 0 0 62.492917
liquid-render (click) 607073 546644 143 2264 8 0% 0 0 0 62.449408
lobsters (click) 7524725 6476153 3224 50084 72 0% 0 0 0 1666.19866
mail (click) 709501 613833 345 4842 14 0% 0 0 0 140.306202
psych-load (click) 290597 249405 65 651 3 0% 0 0 0 20.067376
railsbench (click) 2903935 2562161 1642 15591 54 0% 0 0 0 440.079357
rubocop (click) 5163589 4470780 2901 47612 105 0% 4 0 0 1387.641807
ruby-lsp (click) 625308 499206 159 2783 14 0% 0 0 0 76.717269
sequel (click) 478130 421940 16 117 0 0% 0 0 0 4.172822
binarytrees (click) 9143 8108 11 75 0 0% 0 0 0 2.97766
blurhash (click) 51313 49807 32 478 0 0% 0 0 0 15.532731
erubi (click) 263591 234529 10 114 0 0% 0 0 0 3.775388
etanni (click) 31538 30138 12 98 0 0% 0 0 0 3.326142
fannkuchredux (click) 24859 26640 9 259 0 0% 0 0 0 7.9167
fluentd (click) 377750 297836 11 111 0 0% 0 0 0 3.56801
graphql (click) 428824 376950 70 668 0 0% 0 0 0 20.414506
graphql-native (click) 395741 362955 42 273 0 0% 0 0 0 9.154038
lee (click) 303366 250857 49 735 0 0% 0 0 0 23.05956
matmul (click) 12467 4614 12 126 0 0% 0 0 0 4.316176
nbody (click) 15071 8084 11 187 0 0% 0 0 0 4.977833
nqueens (click) 23554 27064 10 263 0 0% 0 0 0 7.80995
optcarrot (click) 312921 264580 194 4346 34 0% 0 0 0 103.731433
rack (click) 264116 239569 31 322 0 0% 0 0 0 9.279527
ruby-json (click) 27885 25578 12 202 0 0% 0 0 0 6.022912
rubykon (click) 130904 126560 145 1506 3 0% 0 0 0 41.425029
sudoku (click) 46746 38099 11 507 0 0% 0 0 0 15.432676
tinygql (click) 302312 278447 63 792 5 0% 0 0 0 22.751196
30k_ifelse (click) 4909277 4374613 9264 50815 0 0% 0 0 0 1399.430259
30k_methods (click) 1850173 1594291 5782 19371 0 0% 0 0 0 495.120454
cfunc_itself (click) 7567 6743 9 72 0 0% 0 0 0 2.338597
fib (click) 4896 5000 8 49 0 0% 0 0 0 1.825399
getivar (click) 6031 6390 8 74 0 0% 0 0 0 2.242937
keyword_args (click) 8175 6947 10 74 0 0% 0 0 0 2.523714
respond_to (click) 8310 8363 9 87 0 0% 0 0 0 2.703208
ruby-xor (click) 7480 7262 9 81 0 0% 0 0 0 2.583624
setivar (click) 5182 4971 8 54 0 0% 0 0 0 1.792231
setivar_object (click) 5520 4991 8 54 0 0% 0 0 0 1.813139
setivar_young (click) 6269 5689 9 62 0 0% 0 0 0 2.040063
str_concat (click) 7832 7705 11 87 0 0% 0 0 0 2.867759
throw (click) 7575 6432 10 69 0 0% 0 0 0 2.335136

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.