YJIT Benchmarks

Details for Benchmarks at 2024-08-19 06:08:31 UTC

YJIT metrics from the yjit-bench suite using Ruby 7061359564

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 74.1% faster than CRuby 3.4.0dev
  • 2.0% faster than YJIT 3.3.4
On railsbench it is
  • 79.4% faster than CRuby 3.4.0dev
  • the same speed as 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 10 49 10 48 10 117 10 115
chunky-png 10 18 10 18 10 36 10 40
erubi-rails 10 10 10 10 10 22 10 20
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 347 10 345 10 497 10 507
liquid-compile 10 344 10 340 10 502 10 502
liquid-render 10 135 10 134 10 356 10 372
lobsters 10 14 10 13 10 25 10 23
mail 10 159 10 154 10 232 10 224
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 131 10 234 10 238
ruby-lsp 10 131 10 125 10 218 10 211
sequel 10 316 10 314 10 435 10 423
binarytrees 10 51 10 50 10 118 10 108
blurhash 10 62 10 63 10 120 10 149
erubi 10 83 10 95 10 99 10 124
etanni 10 59 10 64 10 69 10 75
fannkuchredux 10 10 10 10 10 16 10 18
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 28 10 31 10 32 10 37
lee 10 11 10 12 10 19 10 21
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 228 10 421 10 517
nqueens 10 114 10 112 10 112 10 448
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 180 10 181 10 572 10 680
protoboeuf-encode 10 125 10 163 10 283 10 646
rack 10 461 10 484 10 837 10 917
ruby-json 10 10 10 10 10 10 10 10
rubykon 10 10 10 10 10 10 10 10
sudoku 10 10 10 10 10 28 10 32
tinygql 10 23 10 23 10 51 10 50
30k_ifelse 10 10 10 10 10 70 10 69
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 250 10 258 10 1108 10 1212
fib 10 102 10 100 10 616 10 618
getivar 10 214 10 230 10 1249 10 1737
keyword_args 10 90 10 88 10 729 10 946
object-new 10 230 10 206 10 309 10 276
respond_to 10 91 10 90 10 1785 10 2096
ruby-xor 10 30 10 30 10 92 10 158
setivar 10 348 10 390 10 2319 10 4858
setivar_object 10 216 10 238 10 536 10 607
setivar_young 10 216 10 247 10 528 10 602
str_concat 10 317 10 359 10 658 10 701
throw 10 973 10 902 10 1343 10 1178

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) 1365011 1217195 214 2169 0 0% 0 0 81.411566
chunky-png (click) 274340 245627 83 1059 1 0% 0 0 36.346895
erubi-rails (click) 1649295 1437371 274 2920 6 0% 0 0 103.117299
hexapdf (click) 1262272 1075003 505 11812 37 0% 0 0 410.996983
liquid-c (click) 463626 364062 119 1768 5 0% 0 0 57.47281
liquid-compile (click) 399409 364510 151 2080 2 0% 0 0 74.128103
liquid-render (click) 568660 496376 136 2323 8 0% 0 0 77.133641
lobsters (click) 7527870 6215030 3082 49769 81 0% 0 0 2249.37168
mail (click) 714690 672264 347 5554 14 0% 0 0 189.238977
psych-load (click) 233984 201002 61 594 3 0% 0 0 21.602487
railsbench (click) 2893968 2508707 1636 15970 57 0% 0 0 593.090549
rubocop (click) 5452472 4507830 2894 50982 114 0% 4 0 1948.829074
ruby-lsp (click) 808908 701570 309 4750 24 0% 0 0 159.75173
sequel (click) 429666 391962 16 116 0 0% 0 0 5.021327
binarytrees (click) 8404 7594 9 66 0 0% 0 0 2.97662
blurhash (click) 50094 43901 30 453 0 0% 0 0 17.710726
erubi (click) 213356 197782 10 112 0 0% 0 0 4.449364
etanni (click) 28405 26890 11 91 0 0% 0 0 3.480197
fannkuchredux (click) 23706 31291 4 252 0 0% 0 0 9.644267
fluentd (click) 334258 278288 4 28 0 0% 0 0 1.394831
graphql (click) 381947 338726 66 650 0 0% 0 0 23.118857
graphql-native (click) 359410 328131 42 278 0 0% 0 0 10.694359
lee (click) 249524 235196 34 531 0 0% 0 0 19.47724
matmul (click) 7957 8968 7 82 0 0% 0 0 3.222984
nbody (click) 15014 19017 10 191 0 0% 0 0 6.241212
nqueens (click) 23822 23823 9 279 0 0% 0 0 10.335128
optcarrot (click) 309010 266612 187 4398 34 0% 0 0 119.49566
protoboeuf (click) 139992 122036 16 1364 0 0% 0 0 49.295385
protoboeuf-encode (click) 212046 158560 18 1189 0 0% 0 0 36.870218
rack (click) 240144 217666 37 445 0 0% 0 0 14.266076
ruby-json (click) 24237 21549 7 166 0 0% 0 0 5.640252
rubykon (click) 130437 109178 136 1500 3 0% 0 0 49.283855
sudoku (click) 45292 24766 7 516 0 0% 0 0 19.20141
tinygql (click) 250784 234863 58 735 5 0% 0 0 24.729772
30k_ifelse (click) 5134313 4729205 9258 50774 0 0% 0 0 1927.872115
30k_methods (click) 2016559 1591611 5777 19335 0 0% 0 0 533.962408
cfunc_itself (click) 7172 6017 8 66 0 0% 0 0 2.37468
fib (click) 4609 4792 7 45 0 0% 0 0 1.864001
getivar (click) 5575 6644 7 70 0 0% 0 0 2.319561
keyword_args (click) 8042 6744 9 68 0 0% 0 0 2.646068
object-new (click) 4039 4024 6 41 0 0% 0 0 1.830213
respond_to (click) 7910 8158 8 81 0 0% 0 0 2.86298
ruby-xor (click) 5219 5772 4 58 0 0% 0 0 1.958213
setivar (click) 4726 5320 7 50 0 0% 0 0 1.852265
setivar_object (click) 5109 5228 7 50 0 0% 0 0 1.947113
setivar_young (click) 5819 5950 8 58 0 0% 0 0 2.175733
str_concat (click) 7415 7947 10 81 0 0% 0 0 3.222979
throw (click) 7538 6222 9 65 0 0% 0 0 2.669837

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.