YJIT Benchmarks

Details for Benchmarks at 2024-10-18 03:45:45 UTC

YJIT metrics from the yjit-bench suite using Ruby 9a98b70a50

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 90.3% faster than CRuby 3.4.0dev
  • 3.3% faster than YJIT 3.3.4
On railsbench it is
  • 101.6% faster than CRuby 3.4.0dev
  • 4.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 5 81 5 82 50 159 50 163
chunky-png 5 31 5 31 50 16 50 21
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 409 5 422 50 598 50 627
liquid-compile 5 415 5 411 50 553 50 592
liquid-render 5 169 5 166 50 407 50 427
lobsters 5 20 5 20 50 10 50 10
mail 5 189 5 192 50 240 50 250
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 154 50 251 50 269
ruby-lsp 5 155 5 137 50 245 50 196
sequel 5 431 5 423 50 604 50 598
binarytrees 5 84 5 84 50 147 50 151
blurhash 5 82 5 82 50 128 50 146
erubi 5 122 5 146 50 28 50 131
etanni 5 91 5 102 50 53 50 64
fannkuchredux 5 52 5 56 50 105 50 113
fluentd 5 62 5 67 50 24 50 32
graphql 5 87 5 88 50 60 50 58
graphql-native 5 40 5 51 50 10 50 13
lee 5 23 5 23 50 10 50 10
matmul 5 54 5 55 50 88 50 101
nbody 5 273 5 277 50 620 50 737
nqueens 5 119 5 119 50 74 50 592
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 174 50 618 50 736
protoboeuf-encode 5 179 5 192 50 330 50 810
rack 5 577 5 617 50 961 50 1088
ruby-json 5 86 5 88 50 53 50 54
rubykon 5 21 5 20 50 10 50 10
sudoku 5 48 5 49 50 171 50 185
tinygql 5 37 5 36 50 25 50 25
30k_ifelse 5 28 5 28 50 214 50 194
30k_methods 5 39 5 38 50 482 50 477
cfunc_itself 5 348 5 343 50 1043 50 1135
fib 5 120 5 127 50 900 50 962
getivar 5 206 5 206 50 2271 50 2597
keyword_args 5 108 5 103 50 959 50 1231
object-new 5 320 5 269 50 407 50 301
respond_to 5 137 5 133 50 3257 50 4034
ruby-xor 5 242 5 249 50 804 50 1381
setivar 5 360 5 362 50 3127 50 5717
setivar_object 5 372 5 340 50 787 50 896
setivar_young 5 372 5 345 50 785 50 950
str_concat 5 398 5 403 50 994 50 1184
throw 5 1287 5 1108 50 1726 50 1401

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) 1447267 1247590 213 2296 0 0% 0 0 65.915452
chunky-png (click) 296011 253137 86 1133 1 0% 0 0 33.931705
erubi-rails (click) 1926276 1684002 248 2835 8 0% 0 0 76.727938
hexapdf (click) 1491559 1330621 598 13855 40 0% 0 0 395.528679
liquid-c (click) 498383 450847 122 1906 5 0% 0 0 51.916634
liquid-compile (click) 415272 388288 150 2201 2 0% 0 0 67.719812
liquid-render (click) 597669 513119 139 2520 12 0% 0 0 69.53101
lobsters (click) 8330174 6994536 3213 54284 181 0% 0 0 1839.591668
mail (click) 752541 668299 346 5481 16 0% 0 0 158.495109
psych-load (click) 256004 248166 64 656 3 0% 0 0 20.296599
railsbench (click) 3310652 2941853 1635 16744 41 0% 0 0 476.575114
rubocop (click) 5809872 5038866 2891 52186 110 0% 4 0 1528.320345
ruby-lsp (click) 847597 787494 308 4986 26 0% 0 0 138.205021
sequel (click) 467006 414282 15 125 0 0% 0 0 4.373886
binarytrees (click) 9721 8668 8 76 0 0% 0 0 3.073709
blurhash (click) 57136 49713 29 501 0 0% 0 0 16.137298
erubi (click) 226148 186369 8 103 0 0% 0 0 3.43364
etanni (click) 24162 22865 9 82 0 0% 0 0 2.789228
fannkuchredux (click) 24038 30826 5 257 0 0% 0 0 7.684753
fluentd (click) 350006 299301 10 109 0 0% 0 0 4.00793
graphql (click) 398811 322515 69 695 0 0% 0 0 20.552967
graphql-native (click) 358754 283678 40 270 0 0% 0 0 8.522739
lee (click) 280995 270437 48 803 0 0% 0 0 24.507276
matmul (click) 11838 4563 10 119 0 0% 0 0 3.947924
nbody (click) 14884 19325 8 196 0 0% 0 0 5.127091
nqueens (click) 21155 28164 7 247 0 0% 0 0 7.222067
optcarrot (click) 327944 312320 190 4549 34 0% 0 0 105.538045
protoboeuf (click) 163392 155036 14 1610 0 0% 0 0 45.974697
protoboeuf-encode (click) 234584 230620 16 1249 0 0% 0 0 31.853163
rack (click) 268540 244941 36 417 0 0% 0 0 10.874458
ruby-json (click) 21333 18570 10 187 0 0% 0 0 5.289289
rubykon (click) 140297 120385 138 1566 3 0% 0 0 44.670175
sudoku (click) 48090 43120 9 536 0 0% 0 0 15.814947
tinygql (click) 270174 221879 61 787 5 0% 0 0 22.48472
30k_ifelse (click) 6315665 5791705 9261 56473 0 0% 0 0 1569.587663
30k_methods (click) 2235566 1593704 5780 19359 0 0% 0 0 452.516019
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.001435
fib (click) 4041 4120 5 37 0 0% 0 0 1.437456
getivar (click) 5037 6014 6 64 0 0% 0 0 1.889089
keyword_args (click) 7637 6022 7 60 0 0% 0 0 2.068685
object-new (click) 3469 3394 5 35 0 0% 0 0 1.372643
respond_to (click) 9322 2039 6 95 0 0% 0 0 2.75142
ruby-xor (click) 6437 6880 6 72 0 0% 0 0 2.188499
setivar (click) 4188 4690 6 44 0 0% 0 0 1.704562
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.710181
setivar_young (click) 5427 5560 7 54 0 0% 0 0 1.90803
str_concat (click) 7646 7893 9 81 0 0% 0 0 2.724602
throw (click) 7384 5592 8 59 0 0% 0 0 2.145414

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.