YJIT Benchmarks

Details for Benchmarks at 2024-09-09 04:00:21 UTC

YJIT metrics from the yjit-bench suite using Ruby d52e599538

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 74.2% faster than CRuby 3.4.0dev
  • 3.4% faster than YJIT 3.3.4
On railsbench it is
  • 84.8% faster than CRuby 3.4.0dev
  • 1.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 57 10 58 10 141 10 151
chunky-png 10 18 10 17 10 36 10 39
erubi-rails 10 10 10 10 10 22 10 21
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 349 10 349 10 491 10 513
liquid-compile 10 344 10 343 10 502 10 503
liquid-render 10 139 10 136 10 354 10 373
lobsters 10 13 10 13 10 24 10 23
mail 10 159 10 160 10 233 10 231
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 134 10 131 10 237 10 241
ruby-lsp 10 126 10 115 10 184 10 186
sequel 10 325 10 323 10 440 10 441
binarytrees 10 51 10 50 10 118 10 114
blurhash 10 62 10 62 10 120 10 144
erubi 10 84 10 96 10 105 10 120
etanni 10 59 10 65 10 69 10 76
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 28 10 30 10 33 10 39
lee 10 11 10 12 10 20 10 22
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 211 10 421 10 536
nqueens 10 113 10 116 10 113 10 447
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 159 10 152 10 582 10 705
protoboeuf-encode 10 133 10 163 10 295 10 661
rack 10 453 10 460 10 850 10 863
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 52 10 53
30k_ifelse 10 10 10 10 10 70 10 63
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 250 10 261 10 1108 10 1212
fib 10 102 10 99 10 616 10 623
getivar 10 215 10 259 10 1248 10 1764
keyword_args 10 90 10 87 10 729 10 948
object-new 10 230 10 197 10 308 10 247
respond_to 10 89 10 94 10 1785 10 2220
ruby-xor 10 30 10 31 10 92 10 160
setivar 10 348 10 412 10 2319 10 3122
setivar_object 10 216 10 258 10 536 10 627
setivar_young 10 216 10 257 10 528 10 625
str_concat 10 320 10 341 10 658 10 671
throw 10 970 10 847 10 1340 10 1095

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) 1453332 1242771 214 2301 0 0% 0 0 80.201455
chunky-png (click) 286535 243698 82 1090 1 0% 0 0 37.620549
erubi-rails (click) 1921483 1560521 245 2810 8 0% 0 0 89.358283
hexapdf (click) 1364633 1126700 507 12606 39 0% 0 0 434.902199
liquid-c (click) 496616 451458 118 1858 5 0% 0 0 61.023335
liquid-compile (click) 411919 371985 150 2182 2 0% 0 0 77.29776
liquid-render (click) 602454 520947 135 2461 11 0% 0 0 81.247116
lobsters (click) 8035090 6766293 3085 51699 182 0% 0 0 2062.224838
mail (click) 749295 643692 346 5481 16 0% 0 0 187.3757
psych-load (click) 243943 199263 60 613 3 0% 0 0 22.330989
railsbench (click) 3311522 2833519 1631 16708 41 0% 0 0 563.249003
rubocop (click) 5815476 4877197 2892 52183 110 0% 4 0 1857.62943
ruby-lsp (click) 846650 711398 308 4991 26 0% 0 0 167.81142
sequel (click) 457587 401557 15 116 0 0% 0 0 4.998763
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.432649
blurhash (click) 57136 49713 29 501 0 0% 0 0 19.88928
erubi (click) 229497 175703 9 108 0 0% 0 0 4.446343
etanni (click) 28241 26371 10 86 0 0% 0 0 3.287296
fannkuchredux (click) 22545 29447 3 240 0 0% 0 0 9.203511
fluentd (click) 363341 290619 3 22 0 0% 0 0 1.010462
graphql (click) 388303 322508 65 649 0 0% 0 0 22.57197
graphql-native (click) 360302 300401 40 270 0 0% 0 0 10.075473
lee (click) 251653 239552 33 567 0 0% 0 0 20.944377
matmul (click) 7323 8338 6 76 0 0% 0 0 2.960203
nbody (click) 15399 19810 9 201 0 0% 0 0 6.39506
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.299749
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 121.606188
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 57.40178
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 38.726681
rack (click) 242346 205678 36 417 0 0% 0 0 13.600578
ruby-json (click) 23001 19730 6 158 0 0% 0 0 5.10666
rubykon (click) 140687 120490 135 1573 3 0% 0 0 52.969547
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.991386
tinygql (click) 265299 230053 57 743 5 0% 0 0 24.755049
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 1916.145569
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 545.718224
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.22843
fib (click) 4585 4605 6 42 0 0% 0 0 1.82717
getivar (click) 5037 6014 6 64 0 0% 0 0 2.15139
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.64118
object-new (click) 3469 3394 5 35 0 0% 0 0 1.866938
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.562477
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.730636
setivar (click) 4188 4690 6 44 0 0% 0 0 1.659402
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.812907
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.055191
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.183039
throw (click) 7384 5592 8 59 0 0% 0 0 2.486972

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.