YJIT Benchmarks

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

YJIT metrics from the yjit-bench suite using Ruby e939f28cc9

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 73.3% faster than CRuby 3.4.0dev
  • 4.1% faster than YJIT 3.3.4
On railsbench it is
  • 78.0% faster than CRuby 3.4.0dev
  • 2.9% 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 143 10 156
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 348 10 354 10 485 10 522
liquid-compile 10 345 10 350 10 501 10 514
liquid-render 10 137 10 135 10 354 10 369
lobsters 10 13 10 13 10 24 10 24
mail 10 160 10 162 10 232 10 234
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 235 10 241
ruby-lsp 10 128 10 127 10 216 10 203
sequel 10 316 10 322 10 431 10 445
binarytrees 10 51 10 51 10 118 10 111
blurhash 10 62 10 63 10 120 10 143
erubi 10 84 10 98 10 105 10 123
etanni 10 60 10 68 10 69 10 79
fannkuchredux 10 59 10 59 10 123 10 136
fluentd 10 38 10 41 10 42 10 47
graphql 10 60 10 61 10 75 10 75
graphql-native 10 28 10 40 10 32 10 47
lee 10 11 10 12 10 19 10 21
matmul 10 38 10 45 10 72 10 84
nbody 10 203 10 223 10 421 10 512
nqueens 10 112 10 117 10 113 10 471
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 158 10 157 10 582 10 642
protoboeuf-encode 10 133 10 168 10 294 10 656
rack 10 458 10 492 10 845 10 909
ruby-json 10 64 10 66 10 76 10 77
rubykon 10 13 10 13 10 37 10 39
sudoku 10 48 10 49 10 139 10 167
tinygql 10 23 10 24 10 51 10 53
30k_ifelse 10 26 10 26 10 230 10 206
30k_methods 10 32 10 32 10 343 10 342
cfunc_itself 10 250 10 254 10 1108 10 1212
fib 10 102 10 99 10 616 10 623
getivar 10 214 10 258 10 1255 10 1756
keyword_args 10 90 10 89 10 729 10 947
object-new 10 230 10 190 10 309 10 242
respond_to 10 91 10 91 10 1785 10 2219
ruby-xor 10 186 10 191 10 497 10 911
setivar 10 348 10 414 10 2319 10 3123
setivar_object 10 216 10 228 10 536 10 488
setivar_young 10 216 10 234 10 528 10 493
str_concat 10 318 10 347 10 659 10 699
throw 10 970 10 826 10 1340 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) 1445377 1225784 214 2301 0 0% 0 0 73.66024
chunky-png (click) 290360 255951 82 1090 1 0% 0 0 35.222722
erubi-rails (click) 1944297 1636664 245 2805 8 0% 0 0 83.730405
hexapdf (click) 1359602 1092876 507 12565 40 0% 0 0 392.466395
liquid-c (click) 489443 429477 119 1859 5 0% 0 0 56.468312
liquid-compile (click) 412209 344715 150 2212 2 0% 0 0 74.395139
liquid-render (click) 608213 495524 136 2473 12 0% 0 0 74.798775
lobsters (click) 8046916 6713578 3088 51784 181 0% 0 0 1882.492849
mail (click) 740112 617884 346 5481 16 0% 0 0 176.015973
psych-load (click) 249424 232033 60 613 3 0% 0 0 21.006474
railsbench (click) 3297372 2868562 1631 16672 41 0% 0 0 521.757902
rubocop (click) 5804308 4934875 2892 52177 110 0% 4 0 1665.347565
ruby-lsp (click) 851137 757697 308 4985 26 0% 0 0 154.235257
sequel (click) 463733 395195 15 117 0 0% 0 0 4.473328
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.269491
blurhash (click) 57136 49713 29 501 0 0% 0 0 18.388384
erubi (click) 215192 189665 9 108 0 0% 0 0 4.005485
etanni (click) 24711 23355 10 87 0 0% 0 0 3.213591
fannkuchredux (click) 24582 31311 6 262 0 0% 0 0 8.776821
fluentd (click) 352309 282062 11 114 0 0% 0 0 4.330775
graphql (click) 396492 318781 70 700 0 0% 0 0 23.573689
graphql-native (click) 367485 337275 41 275 0 0% 0 0 9.598017
lee (click) 259185 240352 33 567 0 0% 0 0 19.412319
matmul (click) 7323 8338 6 76 0 0% 0 0 2.836847
nbody (click) 15428 19810 9 201 0 0% 0 0 5.963589
nqueens (click) 21699 28649 8 252 0 0% 0 0 8.592322
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 112.629422
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 52.587987
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 36.324366
rack (click) 242485 205810 36 417 0 0% 0 0 12.287663
ruby-json (click) 27649 24400 11 194 0 0% 0 0 6.259801
rubykon (click) 137360 133862 132 1535 3 0% 0 0 48.103831
sudoku (click) 44908 40454 6 507 0 0% 0 0 16.931457
tinygql (click) 272416 230572 57 743 5 0% 0 0 23.408428
30k_ifelse (click) 6316209 5792190 9262 56478 0 0% 0 0 1813.212467
30k_methods (click) 2236110 1594189 5781 19364 0 0% 0 0 521.341287
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.198559
fib (click) 4585 4605 6 42 0 0% 0 0 1.795708
getivar (click) 5037 6014 6 64 0 0% 0 0 1.997502
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.490469
object-new (click) 3469 3394 5 35 0 0% 0 0 1.58406
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.353148
ruby-xor (click) 6981 7365 7 77 0 0% 0 0 2.725828
setivar (click) 4188 4690 6 44 0 0% 0 0 1.657663
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.87762
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.114131
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.146284
throw (click) 7384 5592 8 59 0 0% 0 0 2.289499

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.