YJIT Benchmarks

Details for Benchmarks at 2024-10-14 04:00:07 UTC

YJIT metrics from the yjit-bench suite using Ruby cf8388f76c

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 74.3% faster than CRuby 3.4.0dev
  • 4.6% faster than YJIT 3.3.4
On railsbench it is
  • 77.2% 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 56 10 59 10 144 10 153
chunky-png 10 18 10 17 10 36 10 39
erubi-rails 10 10 10 10 10 23 10 23
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 349 10 353 10 499 10 518
liquid-compile 10 348 10 348 10 502 10 514
liquid-render 10 138 10 136 10 353 10 371
lobsters 10 13 10 13 10 24 10 24
mail 10 159 10 163 10 235 10 235
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 135 10 234 10 241
ruby-lsp 10 127 10 134 10 218 10 234
sequel 10 319 10 320 10 429 10 435
binarytrees 10 51 10 50 10 118 10 112
blurhash 10 62 10 62 10 120 10 146
erubi 10 79 10 97 10 104 10 128
etanni 10 60 10 69 10 69 10 81
fannkuchredux 10 58 10 59 10 123 10 135
fluentd 10 37 10 43 10 42 10 47
graphql 10 62 10 62 10 75 10 75
graphql-native 10 29 10 40 10 32 10 45
lee 10 11 10 11 10 19 10 20
matmul 10 38 10 46 10 72 10 83
nbody 10 199 10 220 10 421 10 516
nqueens 10 113 10 119 10 113 10 447
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 157 10 157 10 582 10 640
protoboeuf-encode 10 132 10 165 10 294 10 660
rack 10 452 10 510 10 813 10 937
ruby-json 10 64 10 66 10 76 10 78
rubykon 10 13 10 12 10 37 10 39
sudoku 10 48 10 50 10 139 10 158
tinygql 10 24 10 23 10 51 10 53
30k_ifelse 10 26 10 26 10 230 10 199
30k_methods 10 33 10 33 10 344 10 343
cfunc_itself 10 250 10 255 10 1108 10 1212
fib 10 102 10 99 10 616 10 623
getivar 10 214 10 225 10 1248 10 1733
keyword_args 10 87 10 86 10 729 10 947
object-new 10 226 10 186 10 308 10 237
respond_to 10 91 10 89 10 1785 10 2217
ruby-xor 10 186 10 189 10 497 10 841
setivar 10 348 10 417 10 2319 10 3124
setivar_object 10 215 10 229 10 538 10 482
setivar_young 10 216 10 230 10 528 10 481
str_concat 10 319 10 345 10 658 10 660
throw 10 972 10 825 10 1341 10 1029

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) 1446343 1286847 214 2301 0 0% 0 0 75.046057
chunky-png (click) 324693 284785 82 1090 1 0% 0 0 35.59248
erubi-rails (click) 1924785 1655663 246 2813 8 0% 0 0 85.187328
hexapdf (click) 1366745 1145223 507 12565 39 0% 0 0 399.096787
liquid-c (click) 496510 407829 119 1859 5 0% 0 0 57.261088
liquid-compile (click) 415738 388738 150 2206 2 0% 0 0 75.312086
liquid-render (click) 636405 553045 136 2473 12 0% 0 0 76.559938
lobsters (click) 8054658 6800059 3087 51931 182 0% 0 0 1902.751689
mail (click) 750534 699784 346 5481 16 0% 0 0 176.613569
psych-load (click) 255025 207824 60 615 3 0% 0 0 21.443277
railsbench (click) 3303738 2862968 1631 16673 41 0% 0 0 528.035779
rubocop (click) 5813787 5015068 2892 52183 110 0% 4 0 1696.701684
ruby-lsp (click) 856778 745947 308 4986 26 0% 0 0 156.428576
sequel (click) 461824 390368 15 125 0 0% 0 0 4.966882
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.310111
blurhash (click) 57136 49713 29 501 0 0% 0 0 18.638685
erubi (click) 217918 174213 9 108 0 0% 0 0 4.026849
etanni (click) 28241 26371 10 86 0 0% 0 0 3.20244
fannkuchredux (click) 24582 31311 6 262 0 0% 0 0 8.866844
fluentd (click) 379037 305558 11 114 0 0% 0 0 4.471022
graphql (click) 388028 307227 70 700 0 0% 0 0 23.89358
graphql-native (click) 354130 285925 41 275 0 0% 0 0 9.959407
lee (click) 261827 218336 33 567 0 0% 0 0 19.45805
matmul (click) 7323 8338 6 76 0 0% 0 0 2.870333
nbody (click) 15428 19810 9 201 0 0% 0 0 6.074371
nqueens (click) 21699 28649 8 252 0 0% 0 0 8.777483
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 115.654799
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 53.396573
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 36.689406
rack (click) 248154 211894 36 454 0 0% 0 0 13.526756
ruby-json (click) 27649 24400 11 194 0 0% 0 0 6.33662
rubykon (click) 135726 115935 132 1521 3 0% 0 0 48.30005
sudoku (click) 44908 40454 6 507 0 0% 0 0 17.207377
tinygql (click) 298873 270145 57 743 5 0% 0 0 23.507354
30k_ifelse (click) 6316209 5792190 9262 56478 0 0% 0 0 1852.762865
30k_methods (click) 2236110 1594189 5781 19364 0 0% 0 0 530.969947
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.236801
fib (click) 4585 4605 6 42 0 0% 0 0 1.804136
getivar (click) 5037 6014 6 64 0 0% 0 0 2.040057
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.51793
object-new (click) 3469 3394 5 35 0 0% 0 0 1.581033
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.410653
ruby-xor (click) 6981 7365 7 77 0 0% 0 0 2.780225
setivar (click) 4188 4690 6 44 0 0% 0 0 1.6758
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.825295
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.057619
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.172002
throw (click) 7384 5592 8 59 0 0% 0 0 2.329648

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.