YJIT Benchmarks

Details for Benchmarks at 2024-09-03 16:37:24 UTC

YJIT metrics from the yjit-bench suite using Ruby f7b097dea0

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 71.7% faster than CRuby 3.4.0dev
  • 1.6% faster than YJIT 3.3.4
On railsbench it is
  • 81.3% faster than CRuby 3.4.0dev
  • 1.2% 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 10 49 10 50 10 118 10 117
chunky-png 10 18 10 17 10 35 10 40
erubi-rails 10 10 10 10 10 21 10 19
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 340 10 349 10 499 10 503
liquid-compile 10 346 10 336 10 501 10 494
liquid-render 10 138 10 133 10 356 10 368
lobsters 10 14 10 13 10 24 10 23
mail 10 158 10 159 10 232 10 230
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 130 10 235 10 236
ruby-lsp 10 128 10 129 10 201 10 194
sequel 10 319 10 317 10 429 10 430
binarytrees 10 51 10 50 10 118 10 108
blurhash 10 62 10 63 10 120 10 144
erubi 10 84 10 94 10 101 10 116
etanni 10 59 10 64 10 69 10 75
fannkuchredux 10 10 10 10 10 17 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 30 10 32 10 39
lee 10 11 10 12 10 19 10 21
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 233 10 421 10 540
nqueens 10 111 10 112 10 113 10 457
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 182 10 183 10 572 10 676
protoboeuf-encode 10 125 10 158 10 278 10 639
rack 10 460 10 498 10 819 10 933
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 22 10 51 10 52
30k_ifelse 10 10 10 10 10 70 10 62
30k_methods 10 10 10 10 10 26 10 25
cfunc_itself 10 249 10 251 10 1108 10 1209
fib 10 101 10 102 10 616 10 623
getivar 10 214 10 243 10 1245 10 1750
keyword_args 10 90 10 87 10 729 10 943
object-new 10 229 10 194 10 308 10 243
respond_to 10 91 10 86 10 1785 10 2210
ruby-xor 10 30 10 30 10 92 10 171
setivar 10 348 10 410 10 2320 10 3120
setivar_object 10 216 10 243 10 536 10 515
setivar_young 10 216 10 245 10 528 10 511
str_concat 10 320 10 337 10 659 10 647
throw 10 971 10 821 10 1346 10 1013

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) 1459399 1227941 214 2299 0 0% 0 0 87.526479
chunky-png (click) 320143 272692 82 1090 1 0% 0 0 38.123297
erubi-rails (click) 1735080 1510020 275 3004 6 0% 0 0 107.103533
hexapdf (click) 1371062 1208412 507 12608 40 0% 0 0 448.161829
liquid-c (click) 520931 456156 118 1858 5 0% 0 0 62.83514
liquid-compile (click) 416503 351469 150 2204 2 0% 0 0 79.491811
liquid-render (click) 607349 486749 135 2472 12 0% 0 0 83.78376
lobsters (click) 8201152 6813951 3078 51467 85 0% 0 0 2377.625668
mail (click) 746526 623003 346 5481 16 0% 0 0 189.779961
psych-load (click) 254583 231004 60 615 3 0% 0 0 23.067896
railsbench (click) 3119668 2668617 1636 16735 57 0% 0 0 636.500461
rubocop (click) 5815201 5051251 2892 52194 110 0% 4 0 2030.544441
ruby-lsp (click) 845570 736630 308 4986 26 0% 0 0 173.608335
sequel (click) 455730 373781 15 118 0 0% 0 0 5.069028
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.511388
blurhash (click) 57136 49713 29 501 0 0% 0 0 20.099168
erubi (click) 228874 175285 9 108 0 0% 0 0 4.595919
etanni (click) 28250 26371 10 86 0 0% 0 0 3.306079
fannkuchredux (click) 22545 29447 3 240 0 0% 0 0 9.313891
fluentd (click) 338283 300047 3 22 0 0% 0 0 1.18108
graphql (click) 386157 362753 65 649 0 0% 0 0 23.137947
graphql-native (click) 366461 312010 40 270 0 0% 0 0 10.526445
lee (click) 251602 242782 33 567 0 0% 0 0 21.043703
matmul (click) 7323 8338 6 76 0 0% 0 0 2.970306
nbody (click) 15399 19810 9 201 0 0% 0 0 6.416165
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.293756
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 123.13731
protoboeuf (click) 147776 155834 15 1438 0 0% 0 0 52.535464
protoboeuf-encode (click) 221137 218623 17 1204 0 0% 0 0 37.490578
rack (click) 234074 222507 36 417 0 0% 0 0 13.480505
ruby-json (click) 23010 19730 6 158 0 0% 0 0 5.167128
rubykon (click) 140687 120490 135 1573 3 0% 0 0 52.920504
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.932549
tinygql (click) 264027 247292 57 743 5 0% 0 0 25.004143
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 2247.17336
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 544.391977
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.256921
fib (click) 4585 4605 6 42 0 0% 0 0 1.830929
getivar (click) 5037 6014 6 64 0 0% 0 0 2.160962
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.658321
object-new (click) 3469 3394 5 35 0 0% 0 0 1.95892
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.604856
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.774618
setivar (click) 4188 4690 6 44 0 0% 0 0 1.784365
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.848474
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.055944
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.245072
throw (click) 7384 5592 8 59 0 0% 0 0 2.469045

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.