YJIT Benchmarks

Details for Benchmarks at 2024-09-29 04:00:17 UTC

YJIT metrics from the yjit-bench suite using Ruby 01ff65af32

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 73.4% faster than CRuby 3.4.0dev
  • 4.1% faster than YJIT 3.3.4
On railsbench it is
  • 75.7% faster than CRuby 3.4.0dev
  • 2.7% 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 58 10 58 10 145 10 150
chunky-png 10 17 10 18 10 36 10 40
erubi-rails 10 10 10 10 10 23 10 22
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 340 10 348 10 481 10 518
liquid-compile 10 345 10 348 10 499 10 528
liquid-render 10 138 10 136 10 353 10 371
lobsters 10 13 10 13 10 23 10 23
mail 10 162 10 156 10 232 10 227
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 136 10 234 10 239
ruby-lsp 10 129 10 125 10 213 10 212
sequel 10 317 10 319 10 432 10 441
binarytrees 10 51 10 50 10 118 10 114
blurhash 10 62 10 61 10 120 10 143
erubi 10 79 10 97 10 105 10 124
etanni 10 59 10 63 10 69 10 76
fannkuchredux 10 59 10 58 10 123 10 128
fluentd 10 38 10 40 10 42 10 48
graphql 10 61 10 62 10 75 10 75
graphql-native 10 29 10 40 10 32 10 47
lee 10 11 10 12 10 20 10 21
matmul 10 38 10 36 10 72 10 80
nbody 10 203 10 198 10 421 10 519
nqueens 10 113 10 116 10 113 10 451
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 157 10 156 10 582 10 637
protoboeuf-encode 10 133 10 166 10 294 10 657
rack 10 461 10 480 10 815 10 933
ruby-json 10 64 10 65 10 76 10 77
rubykon 10 13 10 12 10 38 10 38
sudoku 10 48 10 47 10 139 10 158
tinygql 10 23 10 24 10 51 10 54
30k_ifelse 10 26 10 26 10 230 10 207
30k_methods 10 32 10 33 10 345 10 343
cfunc_itself 10 246 10 265 10 1108 10 1212
fib 10 102 10 105 10 616 10 623
getivar 10 213 10 229 10 1250 10 1735
keyword_args 10 90 10 90 10 730 10 948
object-new 10 230 10 186 10 309 10 236
respond_to 10 91 10 92 10 1785 10 2218
ruby-xor 10 186 10 198 10 496 10 929
setivar 10 348 10 381 10 2319 10 3103
setivar_object 10 219 10 209 10 536 10 484
setivar_young 10 216 10 210 10 529 10 488
str_concat 10 319 10 336 10 658 10 690
throw 10 972 10 830 10 1342 10 1035

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) 1465047 1327172 214 2301 0 0% 0 0 75.706441
chunky-png (click) 294641 267575 82 1090 1 0% 0 0 35.734082
erubi-rails (click) 1924497 1604285 245 2827 8 0% 0 0 86.977997
hexapdf (click) 1364402 1162045 507 12572 40 0% 0 0 402.479754
liquid-c (click) 500554 439788 119 1859 5 0% 0 0 57.273551
liquid-compile (click) 444833 384010 150 2204 2 0% 0 0 74.724776
liquid-render (click) 631665 548630 136 2473 12 0% 0 0 76.702838
lobsters (click) 8053666 6727644 3087 51816 183 0% 0 0 1928.505466
mail (click) 775269 687815 346 5489 16 0% 0 0 179.045574
psych-load (click) 250791 195696 60 613 3 0% 0 0 21.457609
railsbench (click) 3326818 2979291 1631 16671 41 0% 0 0 533.599373
rubocop (click) 5838652 5020676 2892 52131 110 0% 4 0 1712.604726
ruby-lsp (click) 887323 789739 308 4991 26 0% 0 0 157.835439
sequel (click) 479124 396274 15 124 0 0% 0 0 5.128466
binarytrees (click) 9721 8668 8 76 0 0% 0 0 3.509615
blurhash (click) 57141 49713 29 501 0 0% 0 0 18.890127
erubi (click) 237386 192250 9 108 0 0% 0 0 4.214297
etanni (click) 28241 26371 10 86 0 0% 0 0 3.256351
fannkuchredux (click) 24582 31311 6 262 0 0% 0 0 9.000696
fluentd (click) 351330 306340 11 114 0 0% 0 0 4.59477
graphql (click) 388309 332564 70 700 0 0% 0 0 23.790679
graphql-native (click) 359822 283803 41 275 0 0% 0 0 10.12904
lee (click) 255347 245910 33 567 0 0% 0 0 19.748469
matmul (click) 7323 8338 6 76 0 0% 0 0 2.937363
nbody (click) 15428 19810 9 201 0 0% 0 0 6.065058
nqueens (click) 21699 28649 8 252 0 0% 0 0 8.79187
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 114.963025
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 53.683441
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 37.347219
rack (click) 267608 244058 36 417 0 0% 0 0 12.796487
ruby-json (click) 27649 24400 11 194 0 0% 0 0 6.408331
rubykon (click) 136122 116214 132 1523 3 0% 0 0 48.933671
sudoku (click) 44908 40454 6 507 0 0% 0 0 17.333358
tinygql (click) 280193 247251 57 743 5 0% 0 0 23.796583
30k_ifelse (click) 6316209 5792190 9262 56478 0 0% 0 0 1866.653779
30k_methods (click) 2236110 1594189 5781 19364 0 0% 0 0 537.256739
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.273026
fib (click) 4585 4605 6 42 0 0% 0 0 1.846912
getivar (click) 5037 6014 6 64 0 0% 0 0 2.057265
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.605925
object-new (click) 3469 3394 5 35 0 0% 0 0 1.663557
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.457139
ruby-xor (click) 6981 7365 7 77 0 0% 0 0 2.84472
setivar (click) 4188 4690 6 44 0 0% 0 0 1.755151
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.927563
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.177869
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.275555
throw (click) 7384 5592 8 59 0 0% 0 0 2.360931

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.