YJIT Benchmarks

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

YJIT metrics from the yjit-bench suite using Ruby f35e97bfa4

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 72.1% faster than CRuby 3.4.0dev
  • 3.3% faster than YJIT 3.3.4
On railsbench it is
  • 77.7% faster than CRuby 3.4.0dev
  • 1.5% 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 139 10 154
chunky-png 10 18 10 18 10 35 10 41
erubi-rails 10 10 10 10 10 23 10 22
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 343 10 352 10 496 10 521
liquid-compile 10 345 10 357 10 498 10 530
liquid-render 10 138 10 135 10 350 10 369
lobsters 10 13 10 13 10 24 10 23
mail 10 158 10 161 10 232 10 232
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 134 10 234 10 241
ruby-lsp 10 127 10 128 10 214 10 183
sequel 10 323 10 322 10 430 10 444
binarytrees 10 50 10 50 10 118 10 108
blurhash 10 62 10 62 10 120 10 147
erubi 10 84 10 99 10 105 10 114
etanni 10 60 10 69 10 69 10 81
fannkuchredux 10 59 10 58 10 123 10 128
fluentd 10 38 10 37 10 42 10 48
graphql 10 61 10 61 10 75 10 74
graphql-native 10 29 10 40 10 32 10 47
lee 10 11 10 12 10 19 10 21
matmul 10 38 10 44 10 72 10 82
nbody 10 203 10 228 10 421 10 529
nqueens 10 113 10 116 10 113 10 459
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 157 10 159 10 582 10 641
protoboeuf-encode 10 132 10 168 10 294 10 660
rack 10 454 10 490 10 847 10 893
ruby-json 10 64 10 66 10 76 10 78
rubykon 10 13 10 12 10 37 10 39
sudoku 10 48 10 48 10 139 10 159
tinygql 10 23 10 23 10 52 10 53
30k_ifelse 10 26 10 26 10 230 10 206
30k_methods 10 32 10 32 10 345 10 342
cfunc_itself 10 247 10 256 10 1108 10 1212
fib 10 101 10 99 10 616 10 623
getivar 10 214 10 259 10 1244 10 1761
keyword_args 10 85 10 88 10 729 10 947
object-new 10 230 10 188 10 308 10 236
respond_to 10 91 10 89 10 1785 10 2219
ruby-xor 10 186 10 191 10 497 10 833
setivar 10 348 10 412 10 2319 10 3122
setivar_object 10 216 10 232 10 536 10 489
setivar_young 10 216 10 234 10 529 10 493
str_concat 10 320 10 346 10 658 10 686
throw 10 969 10 837 10 1344 10 1030

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) 1482389 1250809 214 2301 0 0% 0 0 74.393291
chunky-png (click) 291270 256603 82 1090 1 0% 0 0 35.590643
erubi-rails (click) 1952625 1617084 245 2810 8 0% 0 0 85.26676
hexapdf (click) 1358553 1156855 507 12565 38 0% 0 0 397.281497
liquid-c (click) 489988 430079 119 1859 5 0% 0 0 57.351385
liquid-compile (click) 445461 343462 150 2212 2 0% 0 0 75.213613
liquid-render (click) 593485 541624 136 2473 12 0% 0 0 75.599484
lobsters (click) 8042455 6784242 3087 51704 182 0% 0 0 1904.968274
mail (click) 752378 660371 346 5481 16 0% 0 0 175.653541
psych-load (click) 247879 217789 60 615 3 0% 0 0 21.080482
railsbench (click) 3302409 2854589 1631 16662 41 0% 0 0 527.168422
rubocop (click) 5808194 5003849 2892 52159 110 0% 4 0 1683.258355
ruby-lsp (click) 883746 778555 308 4991 26 0% 0 0 156.682295
sequel (click) 466082 413711 15 120 0 0% 0 0 4.790559
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.346241
blurhash (click) 57136 49713 29 501 0 0% 0 0 18.588212
erubi (click) 254580 246442 9 108 0 0% 0 0 4.168149
etanni (click) 28241 26371 10 86 0 0% 0 0 3.221113
fannkuchredux (click) 24582 31311 6 262 0 0% 0 0 8.854113
fluentd (click) 363854 309064 11 114 0 0% 0 0 4.233547
graphql (click) 428176 373765 70 700 0 0% 0 0 23.63556
graphql-native (click) 368276 305229 41 275 0 0% 0 0 9.864261
lee (click) 284156 261992 33 567 0 0% 0 0 19.607976
matmul (click) 7323 8338 6 76 0 0% 0 0 2.873459
nbody (click) 15428 19810 9 201 0 0% 0 0 5.994565
nqueens (click) 21699 28649 8 252 0 0% 0 0 8.754032
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 113.909978
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 53.263134
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 36.607897
rack (click) 267863 252452 36 417 0 0% 0 0 12.562736
ruby-json (click) 27649 24400 11 193 0 0% 0 0 6.338591
rubykon (click) 135726 115935 132 1521 3 0% 0 0 48.11832
sudoku (click) 44908 40454 6 507 0 0% 0 0 17.066624
tinygql (click) 257959 227946 57 743 5 0% 0 0 23.556163
30k_ifelse (click) 6316209 5792190 9262 56478 0 0% 0 0 1850.962581
30k_methods (click) 2236110 1594189 5781 19364 0 0% 0 0 531.780977
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.266549
fib (click) 4585 4605 6 42 0 0% 0 0 1.823577
getivar (click) 5037 6014 6 64 0 0% 0 0 2.018605
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.530589
object-new (click) 3469 3394 5 35 0 0% 0 0 1.599093
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.380311
ruby-xor (click) 6981 7365 7 77 0 0% 0 0 2.800253
setivar (click) 4188 4690 6 44 0 0% 0 0 1.686059
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.900117
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.135878
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.193804
throw (click) 7384 5592 8 59 0 0% 0 0 2.338014

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.