YJIT Benchmarks

Details for Benchmarks at 2024-11-14 03:44:51 UTC

YJIT metrics from the yjit-bench suite using Ruby 310e6603a2

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 92.3% faster than CRuby 3.4.0dev
  • 5.7% faster than YJIT 3.3.4
On railsbench it is
  • 94.4% faster than CRuby 3.4.0dev
  • 1.9% faster than YJIT 3.3.4

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.3.4 warmups CRuby 3.3.4 iters CRuby 3.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.3.4 warmups YJIT 3.3.4 iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 5 83 5 84 50 159 50 164
chunky-png 5 31 5 31 50 15 50 32
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 410 5 429 50 568 50 630
liquid-compile 5 412 5 408 50 548 50 556
liquid-render 5 169 5 168 50 405 50 443
lobsters 5 20 5 20 50 10 50 10
mail 5 187 5 193 50 241 50 250
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 157 5 155 50 252 50 263
ruby-lsp 5 157 5 141 50 252 50 266
sequel 5 417 5 420 50 597 50 590
binarytrees 5 83 5 83 50 146 50 151
blurhash 5 82 5 82 50 127 50 145
erubi 5 113 5 150 50 95 50 148
etanni 5 90 5 101 50 52 50 71
fannkuchredux 5 52 5 55 50 100 50 104
fluentd 5 61 5 61 50 23 50 22
graphql 5 85 5 86 50 56 50 58
graphql-native 5 39 5 52 50 10 50 14
lee 5 23 5 22 50 10 50 10
matmul 5 52 5 48 50 88 50 98
nbody 5 248 5 248 50 595 50 717
nqueens 5 119 5 120 50 74 50 565
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 176 50 616 50 735
protoboeuf-encode 5 179 5 200 50 328 50 833
rack 5 577 5 629 50 956 50 1074
ruby-json 5 84 5 84 50 50 50 51
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 163 50 161
tinygql 5 36 5 37 50 24 50 28
30k_ifelse 5 28 5 28 50 214 50 193
30k_methods 5 39 5 38 50 482 50 469
cfunc_itself 5 340 5 336 50 1046 50 1135
fib 5 127 5 126 50 900 50 962
getivar 5 209 5 214 50 2268 50 2611
keyword_args 5 105 5 106 50 959 50 1231
object-new 5 321 5 315 50 406 50 383
respond_to 5 137 5 133 50 3256 50 4040
ruby-xor 5 242 5 246 50 803 50 1378
setivar 5 360 5 358 50 3124 50 5698
setivar_object 5 374 5 341 50 759 50 830
setivar_young 5 373 5 343 50 772 50 840
str_concat 5 397 5 379 50 990 50 1213
throw 5 1270 5 1323 50 1727 50 1748

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) 1469505 1269452 213 2351 0 0% 0 0 68.410288
chunky-png (click) 316099 289692 87 1214 1 0% 0 0 36.92108
erubi-rails (click) 1968445 1616709 264 3057 19 0% 0 0 83.81566
hexapdf (click) 1502620 1277476 598 13917 40 0% 0 0 400.020336
liquid-c (click) 492531 450368 119 1852 5 0% 0 0 52.473908
liquid-compile (click) 422836 324630 150 2213 2 0% 0 0 69.744048
liquid-render (click) 623008 510933 136 2474 12 0% 0 0 70.171669
lobsters (click) 8417594 7076608 3214 54865 188 0% 0 0 1869.233514
mail (click) 769626 663608 346 5581 16 0% 0 0 162.074698
psych-load (click) 256904 234619 64 656 3 0% 0 0 20.499028
railsbench (click) 3356396 2997706 1646 17060 52 0% 0 0 493.91457
rubocop (click) 5856579 4993146 2891 52421 110 0% 4 0 1526.319966
ruby-lsp (click) 850970 790742 309 5005 26 0% 0 0 142.004031
sequel (click) 478155 428220 15 120 0 0% 0 0 4.087723
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.036215
blurhash (click) 57136 49713 29 501 0 0% 0 0 16.309889
erubi (click) 246433 217578 8 113 0 0% 0 0 3.808617
etanni (click) 32243 30528 9 94 0 0% 0 0 3.273514
fannkuchredux (click) 24038 30826 5 257 0 0% 0 0 7.751654
fluentd (click) 367186 314122 10 109 0 0% 0 0 3.800584
graphql (click) 415222 359290 69 695 0 0% 0 0 20.710988
graphql-native (click) 377566 341714 40 270 0 0% 0 0 8.566233
lee (click) 292196 234744 48 841 0 0% 0 0 26.16985
matmul (click) 11838 4563 10 119 0 0% 0 0 3.971729
nbody (click) 14884 19325 8 196 0 0% 0 0 5.104513
nqueens (click) 21155 28164 7 247 0 0% 0 0 7.245623
optcarrot (click) 327944 312320 190 4549 34 0% 0 0 103.752555
protoboeuf (click) 163392 155036 14 1610 0 0% 0 0 46.22959
protoboeuf-encode (click) 234584 230620 16 1249 0 0% 0 0 32.325989
rack (click) 241265 221312 36 417 0 0% 0 0 11.278014
ruby-json (click) 25209 21830 11 192 0 0% 0 0 5.583322
rubykon (click) 142198 122470 139 1584 3 0% 0 0 45.396086
sudoku (click) 48052 35463 9 538 0 0% 0 0 16.158266
tinygql (click) 290275 248434 61 787 5 0% 0 0 22.4951
30k_ifelse (click) 6315665 5791705 9261 56473 0 0% 0 0 1559.163912
30k_methods (click) 2235566 1593704 5780 19359 0 0% 0 0 453.432198
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.03938
fib (click) 4041 4120 5 37 0 0% 0 0 1.390962
getivar (click) 5037 6014 6 64 0 0% 0 0 1.936092
keyword_args (click) 7637 6022 7 60 0 0% 0 0 2.079336
object-new (click) 3469 3394 5 35 0 0% 0 0 1.380961
respond_to (click) 9322 2039 6 95 0 0% 0 0 2.792026
ruby-xor (click) 6437 6880 6 72 0 0% 0 0 2.266742
setivar (click) 4188 4690 6 44 0 0% 0 0 1.64772
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.685412
setivar_young (click) 5427 5560 7 54 0 0% 0 0 1.893698
str_concat (click) 7646 7893 9 81 0 0% 0 0 2.73987
throw (click) 7384 5592 8 59 0 0% 0 0 2.155604

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.