YJIT Benchmarks

Details for Benchmarks at 2024-09-28 04:00:18 UTC

YJIT metrics from the yjit-bench suite using Ruby 027ef60500

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 73.1% faster than CRuby 3.4.0dev
  • 3.8% faster than YJIT 3.3.4
On railsbench it is
  • 76.1% 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 56 10 59 10 146 10 152
chunky-png 10 18 10 18 10 35 10 41
erubi-rails 10 10 10 10 10 22 10 22
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 340 10 350 10 499 10 513
liquid-compile 10 346 10 359 10 501 10 511
liquid-render 10 139 10 136 10 356 10 364
lobsters 10 13 10 13 10 24 10 23
mail 10 158 10 162 10 231 10 231
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 136 10 134 10 234 10 243
ruby-lsp 10 130 10 130 10 214 10 227
sequel 10 324 10 322 10 436 10 438
binarytrees 10 51 10 50 10 118 10 112
blurhash 10 62 10 61 10 120 10 145
erubi 10 83 10 97 10 101 10 63
etanni 10 59 10 68 10 69 10 79
fannkuchredux 10 59 10 58 10 123 10 128
fluentd 10 38 10 41 10 42 10 48
graphql 10 61 10 61 10 75 10 74
graphql-native 10 29 10 40 10 34 10 47
lee 10 11 10 12 10 19 10 21
matmul 10 38 10 36 10 72 10 80
nbody 10 203 10 198 10 421 10 515
nqueens 10 113 10 114 10 113 10 453
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 158 10 156 10 582 10 635
protoboeuf-encode 10 133 10 167 10 293 10 659
rack 10 462 10 487 10 828 10 931
ruby-json 10 64 10 65 10 76 10 78
rubykon 10 13 10 12 10 37 10 38
sudoku 10 48 10 47 10 139 10 158
tinygql 10 23 10 24 10 40 10 54
30k_ifelse 10 26 10 26 10 231 10 208
30k_methods 10 32 10 32 10 345 10 342
cfunc_itself 10 249 10 266 10 1108 10 1212
fib 10 102 10 105 10 616 10 623
getivar 10 215 10 229 10 1252 10 1736
keyword_args 10 90 10 90 10 730 10 946
object-new 10 230 10 185 10 309 10 236
respond_to 10 91 10 94 10 1785 10 2217
ruby-xor 10 186 10 198 10 496 10 934
setivar 10 348 10 379 10 2320 10 3102
setivar_object 10 216 10 209 10 536 10 484
setivar_young 10 216 10 210 10 528 10 488
str_concat 10 320 10 333 10 658 10 677
throw 10 969 10 821 10 1344 10 1044

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) 1479608 1289275 214 2301 0 0% 0 0 75.410013
chunky-png (click) 298845 262347 82 1095 1 0% 0 0 36.18353
erubi-rails (click) 1918643 1678576 246 2771 6 0% 0 0 84.86173
hexapdf (click) 1363529 1169592 507 12571 40 0% 0 0 404.683092
liquid-c (click) 524846 483968 119 1859 5 0% 0 0 57.301763
liquid-compile (click) 409717 364048 150 2211 2 0% 0 0 75.466015
liquid-render (click) 632016 540948 136 2473 12 0% 0 0 76.59665
lobsters (click) 8068525 6856483 3086 51928 181 0% 0 0 1935.993252
mail (click) 748077 687976 346 5489 16 0% 0 0 177.938168
psych-load (click) 242994 220757 60 615 3 0% 0 0 21.475875
railsbench (click) 3303994 2853542 1631 16676 41 0% 0 0 532.125614
rubocop (click) 5802135 4941971 2892 52114 110 0% 4 0 1703.421327
ruby-lsp (click) 843170 751169 308 4992 26 0% 0 0 158.976062
sequel (click) 489725 419071 15 124 0 0% 0 0 5.183935
binarytrees (click) 9721 8668 8 76 0 0% 0 0 3.48106
blurhash (click) 57141 49713 29 501 0 0% 0 0 18.867506
erubi (click) 251296 218831 9 108 0 0% 0 0 4.137439
etanni (click) 24711 23355 10 87 0 0% 0 0 3.326772
fannkuchredux (click) 24582 31311 6 262 0 0% 0 0 8.999936
fluentd (click) 346730 318546 11 114 0 0% 0 0 4.441378
graphql (click) 424904 378782 70 700 0 0% 0 0 23.837183
graphql-native (click) 367446 287943 41 275 0 0% 0 0 9.953798
lee (click) 258961 207405 33 567 0 0% 0 0 19.8745
matmul (click) 7323 8338 6 76 0 0% 0 0 2.923178
nbody (click) 15428 19810 9 201 0 0% 0 0 6.086154
nqueens (click) 21699 28649 8 252 0 0% 0 0 8.798872
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 115.650142
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 53.882487
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 37.10189
rack (click) 264019 232747 36 420 0 0% 0 0 12.59671
ruby-json (click) 27649 24400 11 193 0 0% 0 0 6.412081
rubykon (click) 135726 115935 132 1521 3 0% 0 0 49.063041
sudoku (click) 44908 40454 6 507 0 0% 0 0 17.460656
tinygql (click) 264936 215179 57 743 5 0% 0 0 24.000922
30k_ifelse (click) 6316209 5792190 9262 56478 0 0% 0 0 1850.295685
30k_methods (click) 2236110 1594189 5781 19364 0 0% 0 0 535.531593
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.270549
fib (click) 4585 4605 6 42 0 0% 0 0 1.84168
getivar (click) 5037 6014 6 64 0 0% 0 0 2.073092
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.569138
object-new (click) 3469 3394 5 35 0 0% 0 0 1.634047
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.452342
ruby-xor (click) 6981 7365 7 77 0 0% 0 0 2.837302
setivar (click) 4188 4690 6 44 0 0% 0 0 1.716638
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.964589
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.167362
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.249723
throw (click) 7384 5592 8 59 0 0% 0 0 2.377902

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.