YJIT Benchmarks

Details for Benchmarks at 2024-09-01 03:46:44 UTC

YJIT metrics from the yjit-bench suite using Ruby 185602e696

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 73.5% faster than CRuby 3.4.0dev
  • 3.0% faster than YJIT 3.3.4
On railsbench it is
  • 78.8% 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 58 10 57 10 147 10 154
chunky-png 10 18 10 18 10 35 10 41
erubi-rails 10 10 10 10 10 23 10 24
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 348 10 351 10 482 10 503
liquid-compile 10 345 10 343 10 504 10 505
liquid-render 10 137 10 135 10 358 10 372
lobsters 10 13 10 13 10 23 10 23
mail 10 162 10 159 10 231 10 235
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 132 10 237 10 237
ruby-lsp 10 127 10 130 10 215 10 186
sequel 10 323 10 319 10 439 10 437
binarytrees 10 51 10 52 10 118 10 114
blurhash 10 62 10 61 10 120 10 144
erubi 10 84 10 97 10 104 10 125
etanni 10 60 10 65 10 69 10 77
fannkuchredux 10 10 10 10 10 17 10 20
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 30 10 31 10 32 10 39
lee 10 11 10 11 10 20 10 20
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 202 10 421 10 514
nqueens 10 111 10 115 10 112 10 439
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 157 10 153 10 537 10 696
protoboeuf-encode 10 133 10 170 10 293 10 655
rack 10 456 10 473 10 851 10 910
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 52
30k_ifelse 10 10 10 10 10 70 10 62
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 249 10 270 10 1108 10 1212
fib 10 102 10 97 10 616 10 623
getivar 10 214 10 230 10 1255 10 1738
keyword_args 10 89 10 90 10 729 10 947
object-new 10 230 10 189 10 309 10 239
respond_to 10 91 10 96 10 1785 10 2219
ruby-xor 10 30 10 31 10 92 10 178
setivar 10 348 10 378 10 2320 10 3100
setivar_object 10 216 10 230 10 536 10 511
setivar_young 10 216 10 230 10 528 10 508
str_concat 10 318 10 356 10 658 10 716
throw 10 984 10 817 10 1341 10 1056

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) 1449267 1246171 214 2301 0 0% 0 0 87.15138
chunky-png (click) 319944 297100 82 1090 1 0% 0 0 37.892212
erubi-rails (click) 1944653 1684980 246 2811 8 0% 0 0 98.286521
hexapdf (click) 1368481 1130443 507 12609 39 0% 0 0 446.768342
liquid-c (click) 493422 438300 118 1858 5 0% 0 0 61.776107
liquid-compile (click) 405682 342432 150 2190 2 0% 0 0 79.038043
liquid-render (click) 632132 524762 135 2472 12 0% 0 0 83.056781
lobsters (click) 8114047 6760513 3076 51929 183 0% 0 0 2394.638723
mail (click) 739866 633974 346 5481 16 0% 0 0 189.56408
psych-load (click) 240640 219380 60 613 3 0% 0 0 22.690943
railsbench (click) 3320946 2930376 1631 16719 41 0% 0 0 639.424003
rubocop (click) 5812972 5046777 2892 52172 110 0% 4 0 2024.893926
ruby-lsp (click) 872917 745675 308 4986 26 0% 0 0 174.418445
sequel (click) 457868 416804 15 116 0 0% 0 0 5.261826
binarytrees (click) 9721 8668 8 76 0 0% 0 0 3.64579
blurhash (click) 57136 49713 29 501 0 0% 0 0 20.291538
erubi (click) 230878 211508 9 108 0 0% 0 0 4.397178
etanni (click) 28250 26371 10 86 0 0% 0 0 3.364575
fannkuchredux (click) 22545 29447 3 240 0 0% 0 0 9.196021
fluentd (click) 347272 294224 3 22 0 0% 0 0 1.044068
graphql (click) 398347 339463 65 649 0 0% 0 0 22.939081
graphql-native (click) 391110 317074 40 270 0 0% 0 0 10.19852
lee (click) 255729 210973 33 567 0 0% 0 0 21.050371
matmul (click) 7323 8338 6 76 0 0% 0 0 3.038525
nbody (click) 15399 19810 9 201 0 0% 0 0 6.444946
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.249249
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 123.10699
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 57.335875
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 38.739121
rack (click) 234769 209621 36 454 0 0% 0 0 14.687008
ruby-json (click) 24342 21342 6 160 0 0% 0 0 5.19847
rubykon (click) 142995 139203 135 1593 3 0% 0 0 53.636317
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.965364
tinygql (click) 294123 257904 57 743 5 0% 0 0 24.899044
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 2233.793165
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 541.103909
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.250637
fib (click) 4585 4605 6 42 0 0% 0 0 1.916822
getivar (click) 5037 6014 6 64 0 0% 0 0 2.105271
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.593923
object-new (click) 3469 3394 5 35 0 0% 0 0 1.825008
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.551708
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.765119
setivar (click) 4188 4690 6 44 0 0% 0 0 1.65961
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.793263
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.071863
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.148565
throw (click) 7384 5592 8 59 0 0% 0 0 2.35392

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.