YJIT Benchmarks

Details for Benchmarks at 2024-08-28 02:24:17 UTC

YJIT metrics from the yjit-bench suite using Ruby 942317ebf8

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 74.8% faster than CRuby 3.4.0dev
  • 3.2% faster than YJIT 3.3.4
On railsbench it is
  • 77.7% faster than CRuby 3.4.0dev
  • 1.2% slower 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 57 10 146 10 150
chunky-png 10 18 10 18 10 36 10 40
erubi-rails 10 10 10 10 10 22 10 22
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 346 10 351 10 486 10 510
liquid-compile 10 344 10 343 10 499 10 498
liquid-render 10 137 10 135 10 357 10 371
lobsters 10 13 10 12 10 24 10 22
mail 10 161 10 157 10 231 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 131 10 235 10 236
ruby-lsp 10 130 10 125 10 212 10 215
sequel 10 325 10 319 10 435 10 438
binarytrees 10 51 10 50 10 118 10 113
blurhash 10 63 10 62 10 120 10 147
erubi 10 79 10 96 10 105 10 115
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 31 10 32 10 39
lee 10 11 10 12 10 20 10 21
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 210 10 421 10 517
nqueens 10 114 10 114 10 113 10 448
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 159 10 153 10 582 10 690
protoboeuf-encode 10 133 10 167 10 295 10 663
rack 10 461 10 475 10 833 10 925
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 33
tinygql 10 23 10 23 10 52 10 51
30k_ifelse 10 10 10 10 10 70 10 62
30k_methods 10 10 10 10 10 26 10 25
cfunc_itself 10 247 10 263 10 1108 10 1211
fib 10 102 10 105 10 616 10 623
getivar 10 214 10 229 10 1248 10 1737
keyword_args 10 89 10 87 10 729 10 946
object-new 10 230 10 196 10 309 10 242
respond_to 10 90 10 91 10 1785 10 2215
ruby-xor 10 30 10 31 10 92 10 174
setivar 10 348 10 408 10 2320 10 3119
setivar_object 10 216 10 238 10 536 10 515
setivar_young 10 216 10 239 10 528 10 509
str_concat 10 319 10 327 10 658 10 700
throw 10 971 10 804 10 1343 10 1041

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) 1464159 1302237 214 2301 0 0% 0 0 87.447336
chunky-png (click) 299468 254894 82 1090 1 0% 0 0 38.16949
erubi-rails (click) 1932196 1627675 245 2810 8 0% 0 0 98.677703
hexapdf (click) 1359561 1215819 507 12608 37 0% 0 0 450.36841
liquid-c (click) 485883 419089 118 1858 5 0% 0 0 62.276938
liquid-compile (click) 408910 366112 150 2187 2 0% 0 0 78.026836
liquid-render (click) 604595 530989 135 2472 12 0% 0 0 83.352129
lobsters (click) 8107824 6755582 3075 51752 183 0% 0 0 2386.96762
mail (click) 739866 633974 346 5481 16 0% 0 0 191.058637
psych-load (click) 245789 230024 60 613 3 0% 0 0 22.542339
railsbench (click) 3308817 2861693 1631 16689 41 0% 0 0 640.35033
rubocop (click) 5816725 4951563 2892 52192 110 0% 4 0 2026.856049
ruby-lsp (click) 890604 777860 308 5052 26 0% 0 0 176.720496
sequel (click) 456627 384043 15 118 0 0% 0 0 5.115542
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.383091
blurhash (click) 57136 49713 29 501 0 0% 0 0 20.370431
erubi (click) 225967 170045 9 108 0 0% 0 0 4.358065
etanni (click) 24711 23355 10 87 0 0% 0 0 3.360251
fannkuchredux (click) 22545 29447 3 240 0 0% 0 0 9.283967
fluentd (click) 352546 298558 3 22 0 0% 0 0 1.184326
graphql (click) 391484 330792 65 649 0 0% 0 0 23.43702
graphql-native (click) 379476 332223 40 270 0 0% 0 0 10.207366
lee (click) 269006 233371 33 567 0 0% 0 0 20.94457
matmul (click) 7323 8338 6 76 0 0% 0 0 2.971452
nbody (click) 15399 19810 9 201 0 0% 0 0 6.449014
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.361406
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 123.56728
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 57.61301
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 38.650347
rack (click) 239082 208656 36 417 0 0% 0 0 13.337064
ruby-json (click) 23921 20995 6 159 0 0% 0 0 5.261198
rubykon (click) 140687 120490 135 1573 3 0% 0 0 52.901312
sudoku (click) 44903 40454 6 507 0 0% 0 0 19.027332
tinygql (click) 268510 232932 57 743 5 0% 0 0 25.264105
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 2246.968315
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 545.456634
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.27178
fib (click) 4585 4605 6 42 0 0% 0 0 1.785373
getivar (click) 5037 6014 6 64 0 0% 0 0 2.116556
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.611501
object-new (click) 3469 3394 5 35 0 0% 0 0 1.907397
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.543376
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.79698
setivar (click) 4188 4690 6 44 0 0% 0 0 1.689353
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.874493
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.0675
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.174357
throw (click) 7384 5592 8 59 0 0% 0 0 2.462188

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.