YJIT Benchmarks

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

YJIT metrics from the yjit-bench suite using Ruby 5131fb5dbe

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 91.4% faster than CRuby 3.4.0dev
  • 4.7% faster than YJIT 3.3.4
On railsbench it is
  • 108.6% faster than CRuby 3.4.0dev
  • 8.2% 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 82 5 82 50 155 50 160
chunky-png 5 31 5 31 50 15 50 20
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 409 5 417 50 590 50 619
liquid-compile 5 410 5 409 50 545 50 587
liquid-render 5 168 5 169 50 405 50 435
lobsters 5 20 5 20 50 10 50 10
mail 5 190 5 191 50 235 50 246
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 249 50 268
ruby-lsp 5 155 5 139 50 247 50 220
sequel 5 429 5 416 50 572 50 584
binarytrees 5 83 5 83 50 149 50 151
blurhash 5 82 5 84 50 127 50 146
erubi 5 121 5 147 50 95 50 129
etanni 5 90 5 99 50 52 50 63
fannkuchredux 5 52 5 55 50 100 50 107
fluentd 5 60 5 68 50 21 50 25
graphql 5 85 5 86 50 57 50 58
graphql-native 5 40 5 51 50 10 50 14
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 52 50 88 50 98
nbody 5 246 5 253 50 595 50 728
nqueens 5 119 5 116 50 73 50 577
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 177 50 616 50 736
protoboeuf-encode 5 178 5 193 50 327 50 792
rack 5 570 5 618 50 949 50 1088
ruby-json 5 85 5 84 50 50 50 49
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 163 50 172
tinygql 5 37 5 36 50 24 50 26
30k_ifelse 5 28 5 28 50 214 50 193
30k_methods 5 39 5 38 50 481 50 476
cfunc_itself 5 355 5 341 50 1046 50 1135
fib 5 127 5 112 50 899 50 962
getivar 5 206 5 205 50 2264 50 2599
keyword_args 5 108 5 103 50 958 50 1229
object-new 5 322 5 272 50 406 50 301
respond_to 5 137 5 134 50 3258 50 4040
ruby-xor 5 243 5 243 50 802 50 1375
setivar 5 361 5 359 50 3127 50 5720
setivar_object 5 372 5 341 50 761 50 790
setivar_young 5 371 5 342 50 771 50 837
str_concat 5 398 5 389 50 984 50 1143
throw 5 1271 5 1112 50 1714 50 1419

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) 1451017 1226880 213 2296 0 0% 0 0 65.726594
chunky-png (click) 304442 261347 86 1133 1 0% 0 0 33.442134
erubi-rails (click) 1940701 1718740 248 2843 8 0% 0 0 77.564986
hexapdf (click) 1496883 1266553 598 13855 39 0% 0 0 394.337218
liquid-c (click) 513091 466581 122 1906 5 0% 0 0 52.906206
liquid-compile (click) 414207 364099 150 2209 2 0% 0 0 68.175826
liquid-render (click) 610226 544690 139 2520 12 0% 0 0 70.663237
lobsters (click) 8325540 7042502 3212 54357 182 0% 0 0 1864.765392
mail (click) 751716 685067 346 5481 16 0% 0 0 159.086512
psych-load (click) 262226 231662 64 656 3 0% 0 0 20.503961
railsbench (click) 3302890 2828845 1635 16748 41 0% 0 0 475.152471
rubocop (click) 5813384 5039179 2891 52178 110 0% 4 0 1528.07713
ruby-lsp (click) 888253 724996 308 4990 26 0% 0 0 139.071468
sequel (click) 465335 412429 15 117 0 0% 0 0 4.107963
binarytrees (click) 9721 8668 8 76 0 0% 0 0 3.111979
blurhash (click) 57136 49713 29 501 0 0% 0 0 16.281974
erubi (click) 226148 186369 8 103 0 0% 0 0 3.497192
etanni (click) 27697 25886 9 81 0 0% 0 0 2.737325
fannkuchredux (click) 24038 30826 5 257 0 0% 0 0 7.724615
fluentd (click) 353090 307943 10 109 0 0% 0 0 3.876733
graphql (click) 395299 352861 69 695 0 0% 0 0 20.77394
graphql-native (click) 375794 322651 40 270 0 0% 0 0 8.611263
lee (click) 273253 224374 48 803 0 0% 0 0 24.745012
matmul (click) 11838 4563 10 119 0 0% 0 0 4.00592
nbody (click) 14884 19325 8 196 0 0% 0 0 5.156813
nqueens (click) 21155 28164 7 247 0 0% 0 0 7.274594
optcarrot (click) 327944 312320 190 4549 34 0% 0 0 105.946232
protoboeuf (click) 163392 155036 14 1610 0 0% 0 0 46.452563
protoboeuf-encode (click) 234584 230620 16 1249 0 0% 0 0 32.04082
rack (click) 244025 207614 36 417 0 0% 0 0 11.062112
ruby-json (click) 21333 18570 10 187 0 0% 0 0 5.401355
rubykon (click) 140297 120385 138 1566 3 0% 0 0 45.098032
sudoku (click) 48090 43120 9 536 0 0% 0 0 15.988163
tinygql (click) 270170 229248 61 787 5 0% 0 0 22.555549
30k_ifelse (click) 6315665 5791705 9261 56473 0 0% 0 0 1577.632406
30k_methods (click) 2235566 1593704 5780 19359 0 0% 0 0 454.325051
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.008531
fib (click) 4041 4120 5 37 0 0% 0 0 1.457345
getivar (click) 5037 6014 6 64 0 0% 0 0 1.911371
keyword_args (click) 7637 6022 7 60 0 0% 0 0 2.067646
object-new (click) 3469 3394 5 35 0 0% 0 0 1.367878
respond_to (click) 9322 2039 6 95 0 0% 0 0 2.761705
ruby-xor (click) 6437 6880 6 72 0 0% 0 0 2.232496
setivar (click) 4188 4690 6 44 0 0% 0 0 1.618535
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.672844
setivar_young (click) 5427 5560 7 54 0 0% 0 0 1.891655
str_concat (click) 7646 7893 9 81 0 0% 0 0 2.713438
throw (click) 7384 5592 8 59 0 0% 0 0 2.131465

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.